User talk:Erutuon/scripts/ScriptInstaller.js

When viewing an installed script, instead of showing "Installed", why not make an uninstall button? Also, could you change deprecated stuff (like global variable wgPageName etc.) to newer replacements. Also, don't repeat Equazcion's mistake by not adding wikt: prefix to the link in the summary text it generates when installing. P.S. it does not work for me. --Dixtosa (talk) 09:32, 21 May 2017 (UTC)
 * Do you have any error in your console that would indicate why it isn't working?
 * I removed the deprecated variables. I'm not immediately sure which link you're referring to, but I'll look for it. — Eru·tuon 18:43, 21 May 2017 (UTC)
 * No. It seems to work only on the pages that are already installed and the script is linked. Your script is the only local script that isn't linked back from my common.js and coincidentally it is the only script for which the buttons don't show up at all.
 * Please do make sure to make an uninstall button as I have stated above. It should be easy.
 * Also clicking the script link (left to the "uninstall" button) in the opened panel of installed scripts starts uninstalling and fails.
 * The link I am referring is the red link in diffs like these.
 * There's one more line generating deprecated warning (variables wgPageContentLanguage and wgNoticeProject). Dixtosa (talk) 19:08, 21 May 2017 (UTC)
 * I've fixed the uninstall button on the list of scripts, and it can now uninstall any script added with js. Now I'm trying to figure out how to add the uninstall button. — Eru·tuon 19:57, 21 May 2017 (UTC)
 * Added the uninstall button... but it appears even when the script isn't installed. Gotta fix that. — Eru·tuon 20:40, 21 May 2017 (UTC)
 * Fixed the uninstall button. Not happy with how the links display. The CSS could be improved. — Eru·tuon 21:49, 21 May 2017 (UTC)
 * I like it thank you. Though there are couple of things you you many want to consider.
 * The best way to determine if the script is importable (or loadable) is probably by checking wgPageContentModel variable not by.
 * The part where it excludes users' own common.js and skin.js pages it also excludes this page which is weird and unnecessary.
 * The following line and the  statement right after the block seem unnecessary to me. This line causes manual installation alert to pop up and I do not see why any page with javascript content model could not be installed automatically.
 * Probably not run on talk pages of scripts? I am not too sure about that.Dixtosa (talk) 19:04, 23 May 2017 (UTC)
 * I think the contentModel idea is good, so I immediately implemented it. It prevents the script from running on this talk page, which is good because it doesn't contain any usable JavaScript code. — Eru·tuon 19:12, 23 May 2017 (UTC)


 * I have installed this on wiki and CSS were not fetched I guess you should use mw.loader instead of importStylesheet. Dixtosa (talk) 21:12, 26 May 2017 (UTC)
 * I've switched to, with the pagename, but I don't know if that works or if I have to use the URL. — Eru·tuon 21:36, 26 May 2017 (UTC)
 * You'll have to tell me how to use  for CSS, because I don't know and can't seem to find a documentation page that explains it. It's frustrating how bad the documentation for   stuff is, or maybe I'm just not proficient enough in programming. — Eru·tuon 21:42, 26 May 2017 (UTC)
 * Is js supposed to work? I tried it, but didn't see the styles when I loaded a JS page. — Eru·tuon 23:20, 26 May 2017 (UTC)
 * No, not specifying the server is the old and deprecated method (like importScript). mw.loader was probably designed to be unambiguous and let userscripts be adjusted to other projects easily (or at no cost).
 * This works: importStylesheetURI("//en.wiktionary.org/w/index.php?title=User:Erutuon/ScriptInstaller.css&action=raw&ctype=text/css")--Dixtosa (talk) 23:25, 26 May 2017 (UTC)


 * Why do I get notified when I land on a script? XD--Dixtosa (talk) 14:03, 28 May 2017 (UTC)
 * Heheh! I guess I was testing something and never removed that. — Eru·tuon 21:07, 28 May 2017 (UTC)

Does it work with monobook?
--So9q (talk) 13:34, 1 September 2019 (UTC)
 * I think so. I used to use MonoBook. — Eru·tuon 16:11, 1 September 2019 (UTC)