Wikipedia talk:WikiProject User scripts/User-script manager

Instructions edit

This is an experimental tool to manage your user script.

To enable it, you need to put the following in your monobook.js :

if (location.href == "http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/User-script_manager")
  {{subst:js|User:Jitse_Niesen/Client-side_preferences/Main.js}}

Then go back to Wikipedia:WikiProject User scripts/User-script manager, choose the scripts you want, and press the button. Your new and shiny user script will be generated.

By default, the script will overwrite your old user script. This can be prevented by placing comments around the fragment as follows:

// jncsp-start
if (location.href == "http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/User-script_manager")
  {{subst:js|User:Jitse_Niesen/Client-side_preferences/Main.js}}
// jncsp-end

If you try this out, please leave some comments below, even if just to say that it worked. Thanks. -- Jitse Niesen (talk) 13:11, 13 August 2006 (UTC)Reply

Comments edit

Works really well! I assume clearing the browser-cache must be done manually. So I don't even have improvements to propose... This extended by some more scripts could become really useful! --Bernardissimo 21:40, 13 August 2006 (UTC)Reply

Thanks. Unfortunately, I don't know how to clear the browser cache from the script, so, yes, it has to be done manually. I do want to include more scripts, but I also want to get some ideas on how to organize them. Just presenting a list of say a hundred scripts is a bit daunting for the user. If you have any suggestions, they'd be most welcome. -- Jitse Niesen (talk) 13:09, 20 August 2006 (UTC)Reply

Very nice edit

I agree, this is great. I'm seeing some errors in the JS console. The first appears once my monobook.js has been loaded (with action=raw) - it says "not well-formed", so I'm guessing that it's trying to parse it as xml. I also get syntax errors when I install the adah script:

syntax error
javascript (line 1)
Returns the name of the page. For example, if you were browsing the "foo" WP page, getPname() would return "foo". ^
syntax error
javascript (line 1)
This script adds hyperlinks with the text "adah" (all diffs above here) to every entry in your watchlist, after the "diff" link. Clinking on one of them opens the corresponding diff and all the more recent ones. You can use this to study all the changes since you last checked the watchlist. This is most useful with a browser configured to open them in tabs. ^

Lupin|talk|popups 15:47, 14 August 2006 (UTC)Reply

Thanks, I was wondering where these errors come from, but your comment makes it very clear. Should be fixed now. Do you have any ideas on how to clear the browser cache (see Bernardissimo's comment above)?
Of course, the greatest piece of JavaScript ever (your popups) should also be included in the list. I presume you prefer it to be included with
document.write("<script> ...");
instead of what I'm doing now (downloading a particular revision and putting this verbatim in the user's monobook.js)? -- Jitse Niesen (talk) 13:09, 20 August 2006 (UTC)Reply

Nonfatal errors edit

While trying this out, I get several errors from Firefox (Image:Xwd-117669816113756.png). I don't know if they're important, but I though you might want to know. --Gwern (contribs) 05:22 16 April 2007 (GMT)

comments edit

slick little tool, very nice. fell across it trying to install extra tabs; i asked it to install a wikify, cleanup and last dif tab. only the last dif tab worked. here is my User:JoeSmack/monobook.js if you're interested. still, making the process of messing with the monobook more layman is a good idea. JoeSmack Talk 18:40, 31 August 2006 (UTC)Reply

Oops, I somehow missed the new comments on this page. This is probably not useful anymore, but the error was caused by some faulty code which was already in your monobook before you tried this tool (one of the addOnloadHook functions called addLink, which was not defined). -- Jitse Niesen (talk) 11:11, 15 November 2006 (UTC)Reply

I hate to ask this and maybe it's not the right place but... edit

Since I'm really having trouble with this script (and have no idea how to read the scripts) could someone add it to my scripts page so I can pick and choose scripts and leave the popup script that's currently there as it is? Thank you! Y0u | Y0ur talk page 06:05, 8 September 2006 (UTC)Reply

Breaking sortable wikitables edit

After a bunch of debugging on IRC, and [> http://en.wikipedia.org/w/index.php?title=User%3ATitoxd%2Fmonobook.js&diff=99923190&oldid=72983558 playing around with my monobook.js], I found that some of the script left over by this tool is breaking the sortable tables feature. Any possible fix? Titoxd(?!?) 04:14, 11 January 2007 (UTC)Reply

No workie on Safari... edit

I added the script to my monobook.js, and it displayed weirdly - and then going back to the manager page, I get the following in my JS console:

Value undefined (result of expression oldconfig.indexOf) is not object.
http://en.wikipedia.org/w/index.php?title=User:Jitse_Niesen/Client-side_preferences/Main.js&action=raw&ctype=text/javascript&dontcountme=s

I'm running Safari 2.0.4 (419.3) on OS X 10.4.8. -- Jay Maynard 04:10, 6 February 2007 (UTC)Reply


How Long Does it take? edit

Ive been sitting here for 30 minutes and it still says please wait. And my! What if I had dial-up????!!!!! --Darkest Hour¿? 21:18, 7 February 2007 (UTC)Reply

  • Make that +60 min. What is wrong with this?????????
  • +30 min. I give. 2 hours is too long.

--Darkest Hour¿? 22:57, 7 February 2007 (UTC)Reply

It should load in a second, a few seconds at most. There is something wrong (see also the above report that it doesn't work for Safari). It works for me, but there are apparently lots of differences between JavaScript support on the different browsers, and I don't have enough experience to be able to fix it. Sorry that I can't be of more help. -- Jitse Niesen (talk) 12:03, 20 February 2007 (UTC)Reply
General rule: If something takes more than 5 minutes to load and it never said anything about it taking a while, it's not going to work. You don't need to wait 2 whole hours to determine that it isn't working properly. Pyrospirit Flames Fire 17:22, 16 March 2007 (UTC)Reply


Possible problem edit

User:Esrever/monobook.js which includes User-script manager is turning up in a number of categories. These are:

This is obviously undesirable so I'd ask someone to look into it as soon as possible. I assume the problem is with User-script manager rather than the different scripts this user is using. Adambro 15:16, 24 April 2007 (UTC)Reply

Can you add more scripts? edit

Like wiked, and many of the other ones listed at WP:JS & WP:T/ET? I really like this. Its very easily used and makes adding scripts simple. «razorclaw» 16:25, 26 April 2007 (UTC)Reply

  • It doesen't matter where you put your scripts they still get deleted. diff I put:
// jncsp-start
// jncsp-end

in my monobook and it still deleted my other scripts. What can I do to avert this? «razorclaw» 17:19, 26 April 2007 (UTC)Reply

AfD categories edit

I don't know what it is doing it, but using this keeps adding my page to the Speedy deletion and AFD categories. Slavlin 23:49, 10 May 2007 (UTC)Reply

Your not the only one, I've stopped using this script awhile back because of this [1], my monobook.js apparently appeared in the AFD Category. Terra What do you want? 13:09, 13 March 2008 (UTC)Reply