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)
Here's my common.js right now.
importScript( 'User:Enterprisey/script-installer.js' ); // Backlink: User:Enterprisey/script-installer.js importScript('User:Enterprisey/easy-brfa.js'); // Backlink: User:Enterprisey/easy-brfa.js importScript('User:Enterprisey/cv-revdel.js'); // Backlink: User:Enterprisey/cv-revdel.js importScript('User:Enterprisey/reply-link.js'); // Backlink: User:Enterprisey/reply-link.js importScript('User:Enterprisey/talk-tab-count.js'); // Backlink: User:Enterprisey/talk-tab-count.js importScript('User:Enterprisey/user-tabs-on-contribs.js'); // Backlink: User:Enterprisey/user-tabs-on-contribs.js
Does that bug you? It bugs me. Would it be possible to change script-installer to match {{ subst:iusc}}'s output? (For that matter, is there a reason it doesn't just generate that subst in the first place? DRY and all that.) Gaelan 💬 ✏️ 09:39, 24 February 2019 (UTC)
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)
@
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)
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)
window.scriptInstallerInstallTarget = "monobook";
to your common.js.
Enterprisey (
talk!) 08:32, 10 November 2020 (UTC)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! ⇒ Aram Talk 13:33, 11 March 2020 (UTC)
|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! ⇒
Aram
Talk 17:25, 10 November 2020 (UTC)
@ Enterprisey: It would be neat if this script was extended to allow installing scripts on global.js, too. ~★ nmaia d 01:05, 15 September 2020 (UTC)
With checkboxes. Enterprisey ( talk!) 04:10, 26 January 2021 (UTC)
I don't think relying on IDs for getting script paths is a good idea as it results in invalid HTML if the same path appears more than once per page. Shouldn't it use a data-*
attribute?
Nardog (
talk) 23:18, 8 April 2021 (UTC)
@
Enterprisey: It would be helpful if you added a function allowing you to add scripts using
scriptManager's syntax. ―
Qwerfjkl |
𝕋𝔸𝕃𝕂 (please use {{
reply to|Qwerfjkl}}
on reply) 13:53, 23 May 2021 (UTC)
@
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 to|Qwerfjkl}}
on reply) 16:47, 12 June 2021 (UTC)This script still seems to be using {{ Iusc}}, rather than {{ Lusc}}, which I understand to be the preferred method. Enterprisey, would it be possible to update that? {{u| Sdkb}} talk 03:47, 23 November 2021 (UTC)
importScript()
(which {{
iusc}}) uses has been deprecated for a while now. See
T95964 ―
sportzpikachu
my talk
contribs 10:45, 10 December 2021 (UTC)
"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)
@ Enterprisey: Now that phab:T300743 is fixed, I can list the other to-do items that I noticed while looking for XSS issues. These are all suggestions for future development that you can take or leave as you see fit.
User:Example/foo"bar.js
). The script trims the first quote character and everything after it, which means it tries to install e.g. User:Example/foo
instead. Fixing this would mean parsing the string with a JavaScript parser instead of with regex - unfortunately, I'm not aware of an easy way of doing that without installing third-party libraries, so this could be a lot of work.Cookie “open_script_installer” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite.
Best — Mr. Stradivarius ♪ talk ♪ 13:33, 7 February 2022 (UTC)
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 • { C• X}) 05:21, 15 May 2022 (UTC)
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)
@ Enterprisey: i am unable to uninstall both autoFormatter & cleanDiff on common.js. can you please look into it. <_> jindam, vani ( talk) 13:56, 27 December 2022 (UTC)
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)
mw.loader.load('//en.wikipedia.org/?title=User:RedWarn/.js&oldid=1161037431&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/?title=User:Writ_Keeper/Scripts/massRollback.js&oldid=1166752807&action=raw&ctype=text/javascript');
@ Enterprisey Currently, the script claims that Wikipedia:AutoEd/complete.js is insecure, in spite of the full protection. Could support be added? Aaron Liu ( talk) 16:56, 13 September 2023 (UTC)
This
edit request to
MediaWiki:Gadget-script-installer.js,
MediaWiki:Gadget-script-installer-core.js and
MediaWiki:Gadget-script-installer-core.css has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
When trying to parse this page. – Novem Linguae ( talk) 21:19, 24 December 2023 (UTC)
This
edit request to
MediaWiki:Gadget-script-installer-core.js has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
This
edit request to
MediaWiki:Gadget-script-installer-core.js has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please change
Line 11: | Line 11: |
// The |
// 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)
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)
Here's my common.js right now.
importScript( 'User:Enterprisey/script-installer.js' ); // Backlink: User:Enterprisey/script-installer.js importScript('User:Enterprisey/easy-brfa.js'); // Backlink: User:Enterprisey/easy-brfa.js importScript('User:Enterprisey/cv-revdel.js'); // Backlink: User:Enterprisey/cv-revdel.js importScript('User:Enterprisey/reply-link.js'); // Backlink: User:Enterprisey/reply-link.js importScript('User:Enterprisey/talk-tab-count.js'); // Backlink: User:Enterprisey/talk-tab-count.js importScript('User:Enterprisey/user-tabs-on-contribs.js'); // Backlink: User:Enterprisey/user-tabs-on-contribs.js
Does that bug you? It bugs me. Would it be possible to change script-installer to match {{ subst:iusc}}'s output? (For that matter, is there a reason it doesn't just generate that subst in the first place? DRY and all that.) Gaelan 💬 ✏️ 09:39, 24 February 2019 (UTC)
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)
@
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)
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)
window.scriptInstallerInstallTarget = "monobook";
to your common.js.
Enterprisey (
talk!) 08:32, 10 November 2020 (UTC)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! ⇒ Aram Talk 13:33, 11 March 2020 (UTC)
|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! ⇒
Aram
Talk 17:25, 10 November 2020 (UTC)
@ Enterprisey: It would be neat if this script was extended to allow installing scripts on global.js, too. ~★ nmaia d 01:05, 15 September 2020 (UTC)
With checkboxes. Enterprisey ( talk!) 04:10, 26 January 2021 (UTC)
I don't think relying on IDs for getting script paths is a good idea as it results in invalid HTML if the same path appears more than once per page. Shouldn't it use a data-*
attribute?
Nardog (
talk) 23:18, 8 April 2021 (UTC)
@
Enterprisey: It would be helpful if you added a function allowing you to add scripts using
scriptManager's syntax. ―
Qwerfjkl |
𝕋𝔸𝕃𝕂 (please use {{
reply to|Qwerfjkl}}
on reply) 13:53, 23 May 2021 (UTC)
@
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 to|Qwerfjkl}}
on reply) 16:47, 12 June 2021 (UTC)This script still seems to be using {{ Iusc}}, rather than {{ Lusc}}, which I understand to be the preferred method. Enterprisey, would it be possible to update that? {{u| Sdkb}} talk 03:47, 23 November 2021 (UTC)
importScript()
(which {{
iusc}}) uses has been deprecated for a while now. See
T95964 ―
sportzpikachu
my talk
contribs 10:45, 10 December 2021 (UTC)
"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)
@ Enterprisey: Now that phab:T300743 is fixed, I can list the other to-do items that I noticed while looking for XSS issues. These are all suggestions for future development that you can take or leave as you see fit.
User:Example/foo"bar.js
). The script trims the first quote character and everything after it, which means it tries to install e.g. User:Example/foo
instead. Fixing this would mean parsing the string with a JavaScript parser instead of with regex - unfortunately, I'm not aware of an easy way of doing that without installing third-party libraries, so this could be a lot of work.Cookie “open_script_installer” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite.
Best — Mr. Stradivarius ♪ talk ♪ 13:33, 7 February 2022 (UTC)
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 • { C• X}) 05:21, 15 May 2022 (UTC)
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)
@ Enterprisey: i am unable to uninstall both autoFormatter & cleanDiff on common.js. can you please look into it. <_> jindam, vani ( talk) 13:56, 27 December 2022 (UTC)
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)
mw.loader.load('//en.wikipedia.org/?title=User:RedWarn/.js&oldid=1161037431&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/?title=User:Writ_Keeper/Scripts/massRollback.js&oldid=1166752807&action=raw&ctype=text/javascript');
@ Enterprisey Currently, the script claims that Wikipedia:AutoEd/complete.js is insecure, in spite of the full protection. Could support be added? Aaron Liu ( talk) 16:56, 13 September 2023 (UTC)
This
edit request to
MediaWiki:Gadget-script-installer.js,
MediaWiki:Gadget-script-installer-core.js and
MediaWiki:Gadget-script-installer-core.css has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
When trying to parse this page. – Novem Linguae ( talk) 21:19, 24 December 2023 (UTC)
This
edit request to
MediaWiki:Gadget-script-installer-core.js has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
This
edit request to
MediaWiki:Gadget-script-installer-core.js has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please change
Line 11: | Line 11: |
// The |
// 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)