File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -58,11 +58,11 @@ function obfuscate(string, elem) {
5858 }
5959}
6060function applyCode ( string , codes ) {
61+ var len = codes . length
6162 var elem = document . createElement ( 'span' ) ,
6263 obfuscated = false ;
63- for ( var i = 0 , len = codes . length ; i < len ; i ++ ) {
64+ for ( var i = 0 ; i < len ; i ++ ) {
6465 elem . style . cssText += styleMap [ codes [ i ] ] + ';' ;
65- if ( codes [ i ] === '§l' )
6666 if ( codes [ i ] === '§k' ) {
6767 obfuscate ( string , elem ) ;
6868 obfuscated = true ;
@@ -76,12 +76,14 @@ function parseStyle(string) {
7676 indexes = [ ] ,
7777 apply = [ ] ,
7878 tmpStr ,
79- deltaIndex ,
79+ indexDelta ,
8080 noCode ,
8181 final = document . createDocumentFragment ( ) ,
82+ len = codes . length ;
8283 i ;
83- string = string . replace ( / \n | \\ n / g, '<br>' ) ;
84- for ( i = 0 , len = codes . length ; i < len ; i ++ ) {
84+ string = string . replace ( / \n | \\ n / g, '<br>' ) ;
85+
86+ for ( i = 0 ; i < len ; i ++ ) {
8587 indexes . push ( string . indexOf ( codes [ i ] ) ) ;
8688 string = string . replace ( codes [ i ] , '\x00\x00' ) ;
8789 }
You can’t perform that action at this time.
0 commit comments