Jump to content

User talk:Ilmari Karonen/monobook.js

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

What is with your User:Ilmari Karonen/godmode-light.js? What is the anomaly?

It's a fork of Sam Hocevar's original script, originally to fix a couple of HTML-escaping bugs. Some people may be using it, so I'm keeping it there even though I've no use for it myself. —Ilmari Karonen (talk) 17:14, 21 April 2006 (UTC)[reply]
Ok, in the german wikipedia only the popups.js worked for revert :-( (lately). --Olliminatore 17:54, 21 April 2006 (UTC)[reply]

Here a loop suggestion:

function importPage(site){
  document.write('<script type="text/javascript" src="/w/index.php?title='
 + site + '&action=raw&ctype=text/javascript&smaxage=2678400&dontcountme=s"><\/script>');
}
importPage('User:Ilmari_Karonen/addlink.js');
importPage('User:Ilmari_Karonen/deletionlog.js');
importPage('User:Ilmari_Karonen/editsection0.js');
importPage('User:Ilmari_Karonen/fixcopyrightedfreeuse.js');
importPage('User:Ilmari_Karonen/fixdiffwidth.js');
importPage('User:Ilmari_Karonen/fixdontknow.js');
importPage('User:Ilmari_Karonen/fixuserjslinks.js');
importPage('User:Ilmari_Karonen/googlelink.js');
importPage('User:Ilmari_Karonen/purge.js');
importPage('User:Ilmari_Karonen/rblcheck.js');
importPage('User:Ilmari_Karonen/replace.js');
importPage('User:Ilmari_Karonen/searchnsmenu.js');
importPage('User:Ilmari_Karonen/sigdash.js');
importPage('User:Ilmari_Karonen/unwatch.js');
importPage('User:Ilmari_Karonen/userboxes.js');
importPage('User:Ilmari_Karonen/watchsince.js');
//importPage('User:Ilmari_Karonen/watchfilter.js');

--Olliminatore 16:41, 21 April 2006 (UTC)[reply]

That would indeed be more compact, but would eliminate the convenient wikilinks. —Ilmari Karonen (talk) 17:14, 21 April 2006 (UTC)[reply]
The convenient wikilinks don't worked anyway!? greeting --Olliminatore 17:54, 21 April 2006 (UTC)[reply]
They work sometimes. Seems as if MediaWiki can't make up its mind whether to render the page as wikitext or as raw code. Editing the page makes the links work for a while, but purging the page cache stops them working. *shrug* —Ilmari Karonen (talk) 19:30, 21 April 2006 (UTC)[reply]
Oh* I see the trick now, thats also the reason for the //<nowiki><pre> line. I see also now that my suggestion only will be a loop with (the modul-names in) an array. But you are all right, as it is for other users (copy & paste). Thx. --

sign-script

[edit]

An little additional question, you know an Script for automatical signation at diskussion-sites? --Olliminatore 22:25, 22 April 2006 (UTC)[reply]

You mean talk pages on Wikipedia? I can't think of a script that would sign your comments automatically, but it shouldn't be hard to write one that would pop up an alert box if you try to save the page without signing. Would that be any good? (The major problem with fully automatic signing would be figuring out where on the page to put the signature.) —Ilmari Karonen (talk) 11:06, 23 April 2006 (UTC)[reply]

Yes :) I've even written one, please control :) User:Olliminatore/sign.js (my first) --Olliminatore 11:28, 23 April 2006 (UTC)[reply]

Looks good. I've made a few minor improvements, I hope you don't mind. They shouldn't affect what the script does, except that I added the "i" flag after "/talk:/" to make it match "Talk:" with a capital T as well. —Ilmari Karonen (talk) 14:08, 23 April 2006 (UTC)[reply]
Also, are you sure you want to match "UTC)"? The way it is now, the script with only alert if no-one has signed the page/section you're editing yet. —Ilmari Karonen (talk) 14:10, 23 April 2006 (UTC)[reply]
Yes very thanks, I exclude Mininoredit!? if(!document.editform.wpMinoredit.checked){ Is the addOnloadHook a global function (worked they also in de:?)? I think the UTC) is needed if I put an message between others!? regards (*testing still version) --Olliminatore 14:30, 23 April 2006 (UTC)[reply]
addOnloadHook() should work on all Wikipedias. It's defined in wikibits.js, part of the standard site javascript. —Ilmari Karonen (talk) 17:01, 23 April 2006 (UTC)[reply]
Here's my version: User:Ilmari Karonen/signcheck.js. It doesn't add a signature, it just checks if there is one and if not, asks if you want to save the page anyway. —Ilmari Karonen (talk) 14:25, 23 April 2006 (UTC)[reply]
Hmm also very good (perhaps we can unit the scripts with an optional variable!?). ps: Can we check only the own added text!? I will also add your Code in "my" Script ;-) --Olliminatore 14:45, 23 April 2006 (UTC)[reply]
I've included now your version. Note: I separated the "Editing" because it don't work for me (lang-settings). But very good to see both Strings in in one Match (that return one variable?) --Olliminatore 15:21, 23 April 2006 (UTC)[reply]
My Script has an fault (after my editing) :-(
I've tried to fix it, does it do what you want now? I've put all the code in the onclick handler for the save button, since I don't think you want the code to run when you do a diff or a preview. Incidentally, my version had a minor bug too: it ignored the return value of oldOnclick(). In any case, the oldOnclick stuff only matters if you use the script together with other scripts that also try to set an onclick handler for the same button. —Ilmari Karonen (talk) 17:01, 23 April 2006 (UTC)[reply]
Yes excellent thats it! I would even do similar :-p, I found also the lost ")") I would put the onsubmit-event in the onclick button (with only one wpMinoredit questioning), but yours is better :D. --Olliminatore 17:45, 23 April 2006 (UTC)[reply]

I've seen that info only now. The feedback goes (continues) here (for the problems of signing, for me it still work). best regards --Olliminatore 21:52, 23 April 2006 (UTC)[reply]

Fix the Minor-Bug!? for var oldOnclick=document.editform.wpSave.onclick; can we add (not replace) this event handler
if (window.addEventListener) document.editform.wpSave.addEventListener("click", oldOnclick, false);
else if (window.attachEvent) document.editform.wpSave.attachEvent("onclick", oldOnclick);
We can also search() the "~~~" bevor and after, only if <nowiki> is present!? --Olliminatore 11:26, 25 April 2006 (UTC)[reply]
I did. But I have seen a malfunction, which related also your script. The return of the wxSave.Button does not matter for the form.submit. To break this event is also a possible way. So it must use the event-handler. I think as yet my code is not sure/ reliable. The warning appears (not replicable) although the signature is there. regards --Olliminatore 13:29, 28 April 2006 (UTC)[reply]