File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed
Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -6,20 +6,16 @@ <h2>JavaScript Randomizer For a Variable</h2>
66
77
88< script >
9+ const lineReader = require ( 'line-reader' ) ;
910const rndInt = Math . floor ( Math . random ( ) * 4 ) + 1
10- if ( rndInt == 1 ) text = 1 ;
11- if ( rndInt == 2 ) text = 2 ;
12- if ( rndInt == 3 ) text = 3 ;
13- if ( rndInt == 4 ) text = 4 ;
14- alert ( text ) ;
15- file = "https://altify-chs.netlify.app/html/socks4.txt"
16- document . getElementById ( 'file' ) . onchange = function ( ) {
17- var file = this . files [ 0 ] ;
18- var reader = new FileReader ( ) ;
19- reader . onload = function ( progressEvent ) {
20- var fileContentArray = this . result . split ( / \r \n | \n / ) ;
21- for ( var line = text ) ;
22- alert ( file ) ;
11+ if ( rndInt == 1 ) line = 1 ;
12+ if ( rndInt == 2 ) line = 2 ;
13+ if ( rndInt == 3 ) line = 3 ;
14+ if ( rndInt == 4 ) line = 4 ;
15+ alert ( line ) ;
16+ lineReader . eachLine ( 'https://altify-chs.netlify.app/html/socks4.txt' , ( line , last ) => {
17+ alert ( line ) ;
18+ } )
2319 }
2420 } ;
2521 reader . readAsText ( file ) ;
You can’t perform that action at this time.
0 commit comments