edit

Hey. Now that you created this, you may want to change the installation instructions for your other user scripts to this script-installer, as opposed to Equazcion's. Just a thought --DannyS712 (talk) 05:43, 9 January 2019 (UTC)Reply

Good idea! Might do that eventually. Enterprisey (talk!) 02:44, 20 January 2019 (UTC)Reply
@Enterprisey: Would you be okay if I did it for you? I'm bored and it kind of bugs me. If not, no worries --DannyS712 (talk) 05:29, 20 January 2019 (UTC)Reply
DannyS712, the thing is after script-installer becomes a gadget, we can just say "if you don't have script-installer yet, just go to the preferences and check this box". (Actually that's not a valid objection to the proposed edits, so...) Thanks for offering to edit it, and go right ahead if you want to. Enterprisey (talk!) 05:36, 20 January 2019 (UTC)Reply
@Enterprisey:   Done I think --DannyS712 (talk) 05:51, 20 January 2019 (UTC)Reply
Thanks! Enterprisey (talk!) 05:56, 20 January 2019 (UTC)Reply

Problem installing scripts with multiple

edit

Hi, I just experienced an issue installing User:BrandonXLF/WatchDoc which has "JS: User:BrandonXLF/WatchDoc" in the source field and then it imported that litterally: "importScript('JS: User:BrandonXLF/WatchDoc.js'); // Backlink: JS: User:BrandonXLF/WatchDoc.js" in this edit. Do whatever you want with this information. ‑‑Trialpears (talk) 07:49, 11 November 2019 (UTC)Reply

Should be fixed now. Enterprisey (talk!) 07:51, 13 November 2019 (UTC)Reply

Suggestion for edit summary

edit

@Enterprisey: I suggest making the reference to the script being installed a wikilink in the edit summary. For example, for my installation of "reply-link.js", the edit summary would be Installing [[User:Enterprisey/reply-link.js]] + ADVERT. I'm not familiar with JavaScript, but I would guess that function getDescription in script-installer-core.js needs to be amended for that:

    Import.prototype.getDescription = function () {
        switch( this.type ) {
            case 0: return "[[" + this.page + "]]";
            case 1: return STRINGS.remoteUrlDesc.replace( "$1", this.page ).replace( "$2", this.wiki );
            case 2: return this.url;
        }
    }

—⁠andrybak (talk) 08:51, 5 February 2020 (UTC)Reply

  Done, thanks for the idea. Enterprisey (talk!) 08:19, 10 November 2020 (UTC)Reply

Skin support

edit

This seems to install things automatically to common.js. Anyway it can default/be bypassed to install things to specific skins like monobook.js instead? Headbomb {t · c · p · b} 19:02, 15 February 2020 (UTC)Reply

Headbomb, now it does; try adding window.scriptInstallerInstallTarget = "monobook"; to your common.js. Enterprisey (talk!) 08:32, 10 November 2020 (UTC)Reply

It doesn't work on Common.js

edit

Hello @Enterprisey:, I'm from ckbwiki. I created this gadget, but it doesn't work on Common.js properly. I mean when we click on Uninstall and/or Disable, the gadget create a new page like ckb:User:Aram/:Aram/common.js. The gadget should work with original common.js except of this action. Can you fix it? Thanks! ⇒ AramTalk 13:33, 11 March 2020 (UTC)Reply

Aram, the new version at MediaWiki:Gadget-script-installer-core.js (wrap in MediaWiki:Gadget-script-installer.js while copying it over) should work. Also, I added more keys to the STRINGS map at the top so it's easier (harder, lol!) to translate. Enterprisey (talk!) 09:51, 10 November 2020 (UTC)Reply
@Enterprisey: Thank you very much for solving this problem! I updated the tool and the problem was gone. :) Emm... I think the |updated= parameter should be updated because you updated it's document today. We have the document. So, can we link your page to our language on Wikidata? Thank you again! ⇒ AramTalk 17:25, 10 November 2020 (UTC)Reply
Aram, sure, go right ahead. Enterprisey (talk!) 02:39, 14 November 2020 (UTC)Reply

Protected edit request on 11 April 2021

edit

I find "without having to edit JavaScript files" misleading because edit JavaScript files is exactly what the gadget does. How about "with single clicks"? Nardog (talk) 18:06, 11 April 2021 (UTC)Reply

@Nardog: I changed to "without having to manually edit ..." good enough? — xaosflux Talk 21:11, 11 April 2021 (UTC)Reply
Sure, that works. Nardog (talk) 21:13, 11 April 2021 (UTC)Reply

Error

edit

@Enterprisey, I can't install scripts with this, or move them, but can uninstall them, and normalize the links. I don't get any JavaScript errors when this happens. Please can you fix this. Qwerfjkl | 𝕋𝔸𝕃𝕂  (please use {{reply to|Qwerfjkl}} on reply) 20:55, 30 May 2021 (UTC)Reply

Nevermind, this was a dialouge box issue. ― Qwerfjkl | 𝕋𝔸𝕃𝕂  (please use {{reply to|Qwerfjkl}} on reply) 16:47, 12 June 2021 (UTC)Reply

Outdated information in "Installation instructions" section

edit

"Installation instructions" section mentions "Editing" section in Preferences/Gadgets page, but in reality the feature is now in "Advanced" section Nyq (talk) 13:49, 29 January 2022 (UTC)Reply

Nyq,   Fixed: Special:Diff/1068841134. —⁠andrybak (talk) 12:22, 30 January 2022 (UTC)Reply

Adding vector-2022.js to the list of skins

edit

Hi @Enterprisey, now that editors here are increasingly moving to vector-2022, can you please add vector-2022.js to the list of available .js pages? It's now available through preferences. Meanwhile, cologneblue is removed from preferences and according to this thread, its unmaintained for years now and its use discouraged. Maybe that should be removed now? Thanks! CX Zoom[he/him] (let's talk • {CX}) 05:21, 15 May 2022 (UTC)Reply

Done, thanks. Enterprisey (talk!) 20:13, 16 August 2022 (UTC)Reply

editRestriction is null

edit

At [1]: jQuery.Deferred exception: editRestriction is null buildCurrentPageInstallElement @ MediaWiki:Gadget-script-installer-core.js
Indeed, mw.config.get( "wgRestrictionEdit" ); is null. Alexis Jazz (talk or ping me) 21:11, 15 August 2022 (UTC)Reply

Done, thanks. Enterprisey (talk!) 20:12, 16 August 2022 (UTC)Reply

Updater functionality?

edit

Hello! Is there functionality for a button in which an update check can be performed for scripts? I briefly glanced at the code, and cannot find one. I understand that auto-updating functionality would be dangerous, but the ability to manually execute a poll/check for updates I think would prove useful, if the feature does not already exist (even if the user has to then manually diff and re-install a script to update it). Thanks for all your hard work! Top5a (talk) 10:51, 22 March 2023 (UTC)Reply

Pinging in case this went unseen! Top5a (talk) 14:33, 26 July 2023 (UTC)Reply
Any changes made to a script are immediately automatically propagated to all of those who have installed it via this gadget because importScript() only supports loading the latest revision. It is installing a script fixed at a given revision and not automatically receiving updates that the gadget lacks support for. Nardog (talk) 14:48, 26 July 2023 (UTC)Reply
Doesn't that only trigger during install/manual import? That seems like a major security and performance issue if the script were to continually refresh and load updated code without user intervention. Also, could potentially load in test/incomplete bugfixes pushed to modules. Top5a (talk) 19:08, 26 July 2023 (UTC)Reply
Security issue yes, by installing a script you're basically giving its author permission to execute arbitrary code in your browser, hence all the warnings. Performance not so much, because scripts are cached in your browser. If you're so concerned about the vulnerability you could do e.g.
mw.loader.load('//en.wiki.x.io/w/index.php?title=User:RedWarn/.js&oldid=1161037431&action=raw&ctype=text/javascript');
mw.loader.load('//en.wiki.x.io/w/index.php?title=User:Writ_Keeper/Scripts/massRollback.js&oldid=1166752807&action=raw&ctype=text/javascript');
to load specific revisions, though that doesn't stop them from loading the latest versions of other scripts, which some scripts, including RedWarn, do to improve performance. Nardog (talk) 00:24, 27 July 2023 (UTC)Reply

Gadget update

edit

Hello! I moved the CSS to a separate page, and also added the missing lines to the STRINGS that need to be translated. Can anyone update the gadget plz:

Thanks! Iniquity (talk) 18:24, 27 November 2023 (UTC)Reply

  Done * Pppery * it has begun... 18:30, 25 December 2023 (UTC)Reply
Thanks! Iniquity (talk) 08:29, 26 December 2023 (UTC)Reply

Bug report: TypeError: Cannot read properties of null (reading '0')

edit

When trying to parse this page. –Novem Linguae (talk) 21:19, 24 December 2023 (UTC)Reply

Fixed it! Andre🚐 03:09, 25 December 2023 (UTC)Reply
Thanks for fixing the wikicode, but I think the gadget still needs a fix as well. JS should not be throwing type errors, and the gadget should not be failing on pages with a user script infobox. No rush on this, just leaving a bug report in case some work is done in the future. –Novem Linguae (talk) 05:22, 25 December 2023 (UTC)Reply
I am not an expert, but this was the fix [2] it was an old type of infobox. Andre🚐 05:29, 25 December 2023 (UTC)Reply
I ran into this bug again today. The install button does not show in the infobox at User:BrandonXLF/ShowUserGender like I would expect it to, and this "cannot read properties of null" error is being thrown when I step debug the code. The solution suggested in Andre's diff above of changing {{Infobox Wikipedia user script}} to {{Infobox user script}} probably isn't the fix, since the latter just redirects to the former. –Novem Linguae (talk) 16:04, 7 May 2024 (UTC)Reply
In today's case, the problem was there were 2 links in the sources field. One was the link to the user script, and one was a link to GitHub. The gadget was picking the GitHub link instead of the user script link, which was confusing it. I fixed it here. –Novem Linguae (talk) 17:10, 7 May 2024 (UTC)Reply

Interface-protected edit request on 25 December 2023

edit

Make the changes in Special:Diff/1191745662/1191763956. The changes allow the script to better detect piped links in the |source= parameter of the {{infobox user script}} and {{Infobox Wikipedia user script}} templates. (Previously piped links would trip up the script and cause it to error out per this thread.) Ping @Enterprisey, Novem Linguae, and Andrevan: as script maintainers and editors involved in the thread :) Sohom (talk) 17:46, 25 December 2023 (UTC)Reply

  Done * Pppery * it has begun... 19:56, 25 December 2023 (UTC)Reply

Interface-protected edit request on 27 January 2024

edit

Please change

Line 11: Line 11:
// The master import list, keyed by target. (A "target" is a user JS subpage // The primary import list, keyed by target. (A "target" is a user JS subpage

to use more inclusive language. Thanks, --DannyS712 (talk) 06:00, 27 January 2024 (UTC)Reply

Courtesy ping @Enterprisey --DannyS712 (talk) 06:00, 27 January 2024 (UTC)Reply
  Done I'm personally not a fan of the entire inclusive language initiative, but since somebody apparently cares there's no reason not to just comply. * Pppery * it has begun... 17:31, 27 January 2024 (UTC)Reply