Skip to content

Commit

Permalink
prefer-const
Browse files Browse the repository at this point in the history
  • Loading branch information
NovemLinguae committed May 7, 2024
1 parent 7b935ea commit fca1c91
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Gadget-script-installer.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@
};

Import.prototype.toJs = function () {
let dis = this.disabled ? '//' : '',
url = this.url;
const dis = this.disabled ? '//' : '';
let url = this.url;
switch ( this.type ) {
case 0: return dis + "importScript('" + escapeForJsString( this.page ) + "'); // " + STRINGS.backlink + ' [[' + escapeForJsComment( this.page ) + ']]';
case 1: url = '//' + encodeURIComponent( this.wiki ) + '.org/w/index.php?title=' +
Expand Down Expand Up @@ -327,9 +327,9 @@
*/
function normalize( target ) {
return getWikitext( getFullTarget( target ) ).then( function ( wikitext ) {
let lines = wikitext.split( '\n' ),
newLines = Array( lines.length ),
currImport;
const lines = wikitext.split( '\n' ),
newLines = Array( lines.length );
let currImport;
for ( let i = 0; i < lines.length; i++ ) {
if ( currImport = Import.fromJs( lines[ i ], target ) ) {
newLines[ i ] = currImport.toJs();
Expand Down

0 comments on commit fca1c91

Please sign in to comment.