MediaWiki talk:Gadget-popups.js
From Wikipedia, the free encyclopedia
Contents |
[edit] Crash
LOL. I can't view this in Firefox without freezing. Perhaps I need to download more RAM? --- RockMFR 19:44, 5 December 2007 (UTC)
- It works for me...if I be absolutely still while it is loading. :P FunPika 02:19, 9 December 2007 (UTC)
[edit] Change request
{{editprotected}}
Please remove the following section from the page (as MediaWiki:Gadget-navpop.css should be able to handle that part's functions if I understand the code correctly):
//////////////////////////////////////////////////////////////////// // Import stylesheet(s) //
if ( window.localCSS ) { document.write('<link rel="stylesheet" type="text/css" href="http://localhost:8080/js/navpop.css">'); } else { document.write('<link rel="stylesheet" type="text/css" href="' + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/navpop.css' + '&action=raw&ctype=text/css&dontcountme=s">'); }
FunPika 03:56, 9 December 2007 (UTC)
Done - I may not technically know JavaScript, but the purpose of that code is obvious. Nihiltres{t.l} 13:45, 9 December 2007 (UTC)
[edit] Fixes for various bugs
{{editprotected}}
This is a list of several issues that have been found in Lupin's code, since it was made a gadget. Lupin seems mostly MIA lately, so little has been done with these things so far. However they all fix important and annoying issues or spelling bugs, and all have been tested by multiple people. --TheDJ (talk • contribs) 15:07, 29 February 2008 (UTC)
- Security fix implemented by Krimpet diff
- Spelling error diff
- Avoid including full copies of images in contributions and histories when these images are mentioned in the edit summary. solution. (changes [[Image:]] into [[:Image:]] in those cases)
- getParamValue uses decodeURI(), but should use decodeURIComponent() explanation by Lupo
- Safari workaround for some (un)escaping issue. diff explanation by Makotoy.
I think it is important to have these fixes applied and since some of this has been lingering since December, without much action by Lupin, I think it is best if they are tackled here. --TheDJ (talk • contribs) 15:07, 29 February 2008 (UTC)
- Could you point me to the code to copy over the current code? (I'm aware of that security problem as well, and agree that it, in particular, needs fixing.) --ais523 19:50, 3 March 2008 (UTC)
[edit] References preview
{{editprotected}} This diff should fix previewing references. A while ago this broke because the ids for the notes were changed in the cite extension. --TheDJ (talk • contribs) 14:04, 26 March 2008 (UTC)
[edit] Porting to another mediawiki installation
I'm a total n00b at JS (give me Ruby any day!) and I am a little overwhelmed by the amount of code here. I run my own wiki using the same software as Wikipedia and this gadget would be cool to have. The problem is that I use the short URL scheme (i.e. mywiki.com/Article). I can find the url/regex that does that here. Any advice on porting popup? --Aquatiki (talk) 07:47, 10 April 2008 (UTC)
[edit] Enhancement to disable popups on certain elements
There was already a built-in function that removes popups from an article's table of contents (i.e., from all anchors under the HTML element with ID 'toc'), but this wasn't generalized so that it could be used with other elements. I really didn't like popups appearing on the special character links under the edit box on article edit pages, so I experimented a bit to figure out what could be done. I found I couldn't disable the popups via code in my monobook.js, so I resorted to patching popups.js directly.
Here are my patches:
- popups.js.diff, made against User:Lupin/popups.js version "Sat Mar 10 21:40:16 UTC 2007"
- gadget-popups.js.diff, made against Mediawiki:Gadget-popups.js version "Sat Mar 3 20:18:00 UTC 2008 en:MediaWiki:Gadget-popups.js" (though the other diff will work just as well)
- Update: Today in these patches and in User:Mjb/popups.js I fixed a silly bug (repeated iteration variable name in a nested loop). Update your copy if necessary. —mjb (talk) 01:52, 2 May 2008 (UTC)
Once the patch is applied and you've edited your monobook.js to load the patched file (such as User:Mjb/popups.js instead of User:Lupin/popups.js), you can further test it by adding noPopupElements=['editpage-specialchars']; to your monobook.js. Then go to an edit page, shift-reload or do whatever you need to do to clear your cache, and now you should observe no popups when you mouseover the special character links under the edit box.
Peer review appreciated. If it works for people, perhaps this could be incorporated into the official scripts? —mjb (talk) 03:02, 22 April 2008 (UTC)
- This is interesting. Can you give a recipe for disabling popups when hovering over a rollback link when viewing a diff? Philip Trueman (talk) 10:30, 1 May 2008 (UTC)
-
- The revision, edit, and undo links at the top of each column on a diff page are all in a pair of divs with ID "mw-diff-otitle1" and "mw-diff-ntitle1". You could disable popups on that set of links by adding those IDs to your noPopupElements array.
noPopupElements=['editpage-specialchars', 'mw-diff-otitle1', 'mw-diff-ntitle1'];- —mjb (talk) 21:00, 1 May 2008 (UTC)

