User talk:Lupin/popups.js
From Wikipedia, the free encyclopedia
See Wikipedia:Tools/Navigation popups for instructions.
[edit] Bug reports
[edit] can't handle punctuation
This is an excellent script, however it seems to have a problem with punctuation and symbols in page names. For example when I hover over D'Entrecasteaux Channel the popup is titled D’Entrecasteaux Channel, no text from the article loads, and the lastContrib and sinceMe features don't work.
Another thing that would make it better would be to have an option to load the contents of the page if the first bit of text is not enough. Me...™ 05:55, 17 November 2006 (UTC)
- When I encountered this problem I was using Safari on Mac OSX, but now I'm using IE on XP it works fine. If that is any help --Me...™ 09:00, 11 December 2006 (UTC)
[edit] "Error on page" in IE6
I'm getting an "Error on page" notification using IE6 on WinXP (SP2) which only comes up when I invoke your popup (which incidentally is great :-). The report I get from IE says the error is Expected ';'
on Line 1 at Character 51. It says Code 0
, whatever that means. Behind that there is apparently also a Syntax error
at Character 61 of Line 1. Like I say, the page loads fine: this error only manifests itself when the popup appears. HTH HAND —Phil | Talk 10:04, September 12, 2005 (UTC)
- Odd. I have no access to IE so unfortunately have nothing intelligent to say. If you can find a good debugger and try to pinpoint the problem yourself I'd be grateful. Lupin|talk|popups 11:38, 12 September 2005 (UTC)
- Put in a good word for me with the deity of your choice: I have downloaded the MS Script Debugger and will install it ASAP :-) —Phil | Talk 09:46, 14 September 2005 (UTC)
- Alas, I cannot figure out how to invoke the darn thing properly. It's quite willing to pop up for other things, but seems to ignore Wikipedia totally. Nonetheless I shall persevere :-) —Phil | Talk 16:18, 15 September 2005 (UTC)
[edit] New look
I just want to say I love the new look, it's alot more classy IMO. -Greg Asche (talk)
- Now as soon as I said that I noticed something. The links to contribs and kate's tool are gone at links to user/user talk pages. Is this intentional, or was it simply a mistake? -Greg Asche (talk) 01:53, 3 October 2005 (UTC)
-
- Glad you like the new look! There should be a separate "user" menu (which, confusingly, is in normal text style, not a big link) next to the main menu rollover which appears for user links. The rationale is that it should stop the menu growing incredibly large. Maybe this is a bad idea.... see Wikipedia_talk:Tools/Navigation_popups. Suggestions welcome! Lupin|talk|popups 11:49, 3 October 2005 (UTC)
I don't like the new "hover once, then hover twice" to get at the actions part of the menu. Could this be made optional? I mostly use it for those actions. It seems like it is now being tailored more for people who only use it to preview articles. — Omegatron 01:36, 8 October 2005 (UTC)
- It is optional. To get back the old style popups, set popupStructure='original';. For this and other interesting tidbits, see WP:POP. Lupin|talk|popups 00:29, 9 November 2005 (UTC)
[edit] Geodis
Can we get this to detect {{geodis}} as a disambiguation tag? Morwen - Talk 22:57, 7 November 2005 (UTC)
- We can - this is working in the dev version, which will become the stable version in time. Lupin|talk|popups 00:52, 9 November 2005 (UTC)
[edit] My little "wish list"
Hi, dunno if this would be possible, but if it was it would I for one would find it very usefull indeed.
When you pop up information on an image page it would be helpfull if the resolution and file size of the image was included somewhere, this would make it easy to spot images that are a bit liberal with the definition of "low resolution" with regards to fair use images.
Another thing that I think would be a huge help would be if you could somehow include a list of "image tags" that are present on a page (as well as raise a "red flag" if there are none whatsoever). What I mean is that when you "pop up" information on an image it would include a list or something wich would imedeately tell you what licence (if any) the image has, wether it's tagged as "no source", or listed on speedy deletion, IFD or PUI and things like that (I guess the easiest approach would be to parse the HTML version and just dump a list of category links as all the important templates have categories attached). --Sherool (talk) 16:01, 5 December 2005 (UTC)
- Another minor thing is that with admin links eneabled the delete URL should be http://en.wikipedia.org/w/index.php?title=Image:[image name]&image=[image name]&action=delete and not just http://en.wikipedia.org/w/index.php?title=Image:[image name]&action=delete for for images. Otherwise the actual image is left intact and only the description page is deleted. --Sherool (talk) 16:39, 5 December 2005 (UTC)
[edit] Copying to other wikis
Hi! Would it be OK if I copied this script to no: and nn:? Or do you prefer to create your own account(s) and copy the script yourself? If I'm going to do the copying, we'll have to sort out credits and also routines for updating. --Eddi (Talk) 19:20, 16 December 2005 (UTC)
- No, please feel free to copy it over yourself. You may be interested to know that the dev version (see here for usage instructions) has a translatable interface. You can update when you want to. By the way, you can use the english version without having to copy it at all - exactly the same installation instructions should apply on the no and nn wikis (don't be tempted to change en to no or nn if you do that). Lupin|talk|popups 15:56, 18 December 2005 (UTC)
-
- Thanks a lot. Translation was on my agenda, so copying was needed. The stable version is now copied to nn:user:Eddideigel/popups.js and works all right, untranslated. Next I'll have a look at the development version at nn:user:Eddideigel/popupsdev.js. --Eddi (Talk) 23:02, 18 December 2005 (UTC)
-
-
- The Norwegian version has been tested for a couple of weeks and seems to work all right. The inclusion of %s in various strings made the translation easier. By the way, there are two Norwegian orthographies, Bokmål (no:/nb:) and Nynorsk (nn:), and I made two translations based on the dev version: nn:user:Eddideigel/popups-no.js and nn:user:Eddideigel/popups-nn.js. Please let me know if the copyright details are presented adequately. Thanks again. --Eddi (Talk) 07:26, 7 January 2006 (UTC)
-
-
-
-
- The entire script is not copyright Aaron Boodman, only the last sub-file (look for the string FILE BOUNDARY). Most of it is, I imagine, copyright me and the contributors listed at Wikipedia:Tools/Navigation popups#Credits and external links. I'm not really aware of the intricacies of copyright, so this may be nonsense of course. Lupin|talk|popups 16:25, 7 January 2006 (UTC)
-
-
- By the way, please add support for wikinews.org. Thanks. -- IlyaHaykinson 01:12, 17 December 2005 (UTC)
Might it be alright to use this code in other, non-wikipedia sites using the wiki software? I moderate this wiki for an online game and we'd be interested in using it.--Mobius Soul 00:00, 18 June 2006 (UTC)
- Could it be added to the campaigns wikia too? Jfingers88 19:15, 17 August 2006 (UTC)
[edit] ARIN link for IP users
Hi Lupin. I added a link to my version of the popups that gives me an ARIN WHOIS lookup link for IP users. I find it useful for figuring out if anonymous edits are likely from the same source. Here's the diff: http://en.wikipedia.org/w/index.php?title=User%3AMike_Dillon%2Fpopups.js&diff=32114349&oldid=30833595
Here's wishing you a happy winter solstice! Mike Dillon 16:33, 20 December 2005 (UTC)
[edit] Human name disambiguation
Could the disambiguation page detector regexp be enhanced to detect articles in category Human name disambiguation (template hndis)? Zoicon5 16:11, 6 January 2006 (UTC)
- I tried making this fix in popupsdev, but I think maybe my javascript skills weren't up to it. It didn't seem to work, so I rolled back my changes. Zoicon5 19:17, 6 January 2006 (UTC)
[edit] Popups bug
There seems to be a minor bug (FFox on XP/*ix) when I try to acces the actions menu. The mouseover cuts out in the tiny gap between the actions link and the actions menu. Maybe slightly repositioning the menu might work? -MagnaMopus 20:42, 12 January 2006 (UTC)
- Yes, I'm not good at CSS and using smaller fonts (or possibly just fonts which differ from mine) results in this bug. You can tweak your CSS to try to overcome this - see User_talk:Lupin/archive7#Problem_with_popups. Lupin|talk|popups 00:37, 19 January 2006 (UTC)
[edit] undef is not defined
Error: undef is not defined Source File: http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js&action=raw&ctype=text/javascript&dontcountme=s Line: 3282
This happens in a number of places, but it's basically the same every time. Example:
if (typeof over != undef && over && over.dragging) return null;
Regards, howcheng {chat} 20:25, 17 January 2006 (UTC)
- Is this in firefox? I think I've seen this bug there sometimes. Usually refreshing the page/clearing the cache makes it go away for me. If you can reproduce it reliably, please let me know. Lupin|talk|popups 00:32, 19 January 2006 (UTC)
Yes, this was in Firefox 1.5. I was getting this a lot on user contributions pages, but clearing the cache seems to have fixed it for now, although that was the first thing I tried last time. Hmm. Will let you know if it shows up again. howcheng {chat} 01:01, 19 January 2006 (UTC)
- I think I figured it out. It's when I start mousing over the links before the script has completed loading. Try loading a page with a lot of links (contributions is good) and move your mouse around while the page is still loading. I immediately got a red exclamation point in my WebDeveloper toolbar. Perhaps you can set a flag when it's done loading and not do anything until the flag is set? howcheng {chat} 21:33, 2 February 2006 (UTC)
[edit] Redlinks
Is there an option=value available so popups gives an automatic redlink removal option when I come across these links on article pages? Any advice appreciated.VirtualSteve 21:08, 8 February 2006 (UTC)
Cheers! Glad you liked the idea. I have pasted dev script and will see how it goes. VirtualSteve 11:52, 9 February 2006 (UTC)
- Sorry tried to understand what to do but I am just a beginner - do I put the following in User:VirtualSteve/monobook.js to activate - popupRedlinkRemoval=true; Sorry I know you are busy but if you have the time to help - or if you want put the code in my page - I can get on to these pesky redlinks? VirtualSteve 12:14, 9 February 2006 (UTC)
-
- Yes, this worked for me when I did that, but you need to switch to the dev version. I'll make that change for you in a moment. Be sure to clear your browser cache (control-shift-r in firefox, control-click on refresh in internet explorer).
-
- [You are probably well aware of this, but I think some red links are considered a Good Thing, for example if an article doesn't exist but really should/could do at some point in the future. General disclaimer applies, use at own liability, check the diffs etc etc] Lupin|talk|popups 12:58, 9 February 2006 (UTC)
Thanks Lupin - that is just brilliant. I take your point on some good red links. I note that Wikipedia:Only make links that are relevant to the context says What should not be linked .... Subsidiary topics that result in redlinks unless the editor is prepared to promptly turn those links into real ones .... It's usually better to resist linking these items until you get around to writing an article on each one.
- My way of dealing with these is to identify when the last edit was made and what it was and if isn't too recent to remove the redlink at the time of finding - hopefully that will not upset too many folks. Anyway I appreciate your development, help and courtesy. VirtualSteve 13:21, 9 February 2006 (UTC)
[edit] script use in other project
Hi Lupin! What should I do in order to use your script in another project running mediawiki?
Thank you!
Paolo 01:39, 19 February 2006 (UTC)
- It should just work provided these lines appear in the Localsettings.php file:
$wgAllowUserJs = true; $wgAllowUserCss = true;
- Ask your site admin if you don't know what this file is. Lupin|talk|popups 02:00, 19 February 2006 (UTC)
Since I just did this for an internal wiki, I can give a little more detail as to what I did in addition to what Lupin mentioned. First, I copied the text of User:Lupin/popups.js into "MediaWiki:Popups.js" in my local wiki. I then imported User:Lupin/menus.css as "MediaWiki:PopupMenus.css". No changes to the CSS were required, but I had to make the following changes to the Javascript (line number refer to this version of popups.js):
- Near line 32, change "http://en.wikipedia.org/w/index.php?title=User:Lupin/menus.css" to your local URL (I changed it to "/w/index.php?title=MediaWiki:PopupMenus.css")
- Near line 96, change popupStrings to refer to documuentation on your local wiki about popups or drop the link to en.wikipedia.org (or leave it if you like)
- Near line 373, the if/else if will only work if used on a wikimedia wiki or on a wiki with "localhost" in the name (there is no plain "else"). I changed it to "
var titletail='/w/index.php?title=';
" and dropped the if/else if (my local wiki uses "/w" as a root, but isn't on localhost) - Near line 395, I changed the "wikibase" var to "
var wikibase=protocol+'://'+thisWiki+'/w/';
" - Near line 3971, I changed the "wpBaseArticlePath" line to "
var wpBaseArticlePath=wpBaseArticlePath||'/w/';
"
I think there are a few more things to tweak, but I haven't done them yet (for instance, the "editors" link still shows up under actions when it should only be there for wikipedia, I think). Once I had done these changes, I added it to my monobook.js on the local wiki and it worked fine. Of the changes listed, item #3 may be a bug, but #2 should be expected configuration. Items #1, #4, and #5 could possibly be made into a configuration parameters. There should also be documentation of the internal dependency on menus.css. Mike Dillon 02:37, 19 February 2006 (UTC)
[edit] Background now transparent
I think since your last change, something weird happened. The background to the popup is now transparent in Firefox, and the text is difficult to read. — 0918BRIAN • 2006-03-4 02:04
[edit] Catalan translations
Hello! I am transating your popups into Catalan language. You can see it in w:ca:Usuari:SMP/strings-ca.js. I have some questions: What is the current diference between popups.js and popupsdev.js??? I am using popups.js and it is working. I also wanted to know if there are more things that can be transated apart from what i can see in User:Lupin/strings-draft. I wanted to translate, for example, the text that apears in the top of the editing page when you are reverting that says "The xxx button has been automatically clicked.". Is it easy for you to change some ways that are used to translate some sentences?? There are a few that sounds a little strange in catalan when translated, but I don't want to ennoy you if it is something difficult to change.--SMP - talk page (en) - talk page (ca) 13:20, 5 March 2006 (UTC)
- The dev version is the version of the code I'm working on at the moment. Right now, it contains a couple of bug fixes, but of course there's the possibility that I've introduced more bugs. popups.js is periodically replaced with the dev version.
- I'll add the strings you requested to the dev version - thanks for pointing out that these are missing. I'd like the script to be easily translatable, so do tell me what I could do to improve this. Thanks, Lupin|talk|popups 14:02, 5 March 2006 (UTC)
[edit] Bug on Firefox
I use Firefox, and when I tried to use the popups on NTFS (I don't advise hovering the mouse there for long if you're using the script) my browser crushed. I believe that is because there is a huge table at the begining of the artice, but I'm not sure. I did it three times and Firefox crushed all the times. Maybe it happens only to me, or to some, but I'd like your opinion. Thank you. jοτομικρόν (talk, email) 18:52, 16 May 2006 (UTC)
- Thanks, this is definitely a bug in the script. I believe I've fixed it in the dev version. Lupin|talk|popups 01:40, 18 May 2006 (UTC)
[edit] Error - Script Fails on https connection
Getting:
Error: v has no properties Source File: http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js&action=raw&ctype=text/javascript&dontcountme=s Line: 1903
Which points to the if (!keepSpaces) line in:
Title.prototype.urlString=function(keepSpaces) { var v=this.value; if (!keepSpaces) { v=v.split(' ').join('_'); } return encodeURI(v).split('&').join('%26').split('?').join('%3F').split('+').join('%2B'); }
Wakemp 23:20, 1 June 2006 (UTC)
- Thanks. Are you seeing this all the time, and can you reproduce it? Does it happen immediately on page load, or do you have to mouseover a link or something to trigger it? Does clearing your cache, crossing your fingers and saying a prayer help? :P Lupin|talk|popups 01:52, 2 June 2006 (UTC)
-
- Every mouse over produces the error in the Java console. Removed the code and re-added to my page, cleared cache both before and after, no joy. Wakemp 03:09, 2 June 2006 (UTC)
-
-
- Firefox 1.5.0.3 under Mac OS X 10.4.6, things were working prior to this week. Thought it was the change in the script. BUT looks like my fault, I started using https://secure.wikimedia.org/wikipedia/en/ to get around a proxy that was put on the blocked list and I have been going back to Wikipedia that way since. Just tried it again from http://en.wikipedia.org/wiki/ and everything works. Weird but My bad! Wakemp 16:22, 2 June 2006 (UTC)
-
[edit] Firefox 1.5.0.4 problems
I upgraded to Firefox 1.5.0.4 tonight, and now when I hover over a "(hist)" link (e.g. in "my contributions") the popup contains a huge amount of text - seemingly the complete source of the article in question. Neilka 22:18, 2 June 2006 (UTC)
- Actually this seems to be working again now - not sure what happened there! Neilka 22:21, 2 June 2006 (UTC)
[edit] Bug when using Opera
Hi, nice script. But there is a bug for Opera users. When you do a mouse over the user "user" menu title, the actual menu does not show up. Actually I think it just shows up too far to the right - because one time I cought a glimpse of a bit of it on the far right of my screen. So probably some minor error in your positioning of that menu that Firefox and IE can ignore but Opera can't. (I am using Opera 9 Beta 2). --Konstable 00:52, 7 June 2006 (UTC)
- Thanks for the bug report. Is it possible for you to post a screenshot, ideally where you can see the menu on the far right of the screen? This may give me clues for how to reproduce this. One other thing: which operating system are you using? Lupin|talk|popups 14:09, 7 June 2006 (UTC)
- Hi Lupin. I could not make the user menu appear far on the side as before (it only happened once). But here is something which might be related - the actions menu appears mis-placed. (and note that in the same case, the user menu still doesn't come up). --Konstable 10:08, 8 June 2006 (UTC)
-
- I have managed to take a screenshot of it (see screenshot2). Also note: It's not just the user menu, the popups menu does not show up either.--Konstable 00:24, 14 June 2006 (UTC)
[edit] Bug:If? interpreted as If
Thanks for the very useful script. Just one bug I noticed – hovering over If? returns If. --Bruce1ee 08:13, 15 June 2006 (UTC)
- BTW I'm using IE6. --Bruce1ee 08:15, 15 June 2006 (UTC)
[edit] Detecting disambiguation pages
Hi! Is the fix disambiguation feature working only in the edit mode? If not, how does it determine if a page is a disambiguation, if it looks for a template to be present, could you please make a modification, so that it detects {{egyért}} as a disambiguation page. The "egyért" template is the Hungarian equivalent of the template used on the English disambiguation pages. With the answer please contact me on my Hungarian talk page hu:User vita:Bdamokos if it is not too much to ask. Thank you for your answer in advance. --Dami 17:08, 15 August 2006 (UTC)
[edit] Popups not active in all pages
For some reason they're active in Special:Recentchanges but not in Special:Contributions/newbies. This is the dev version AFAICT, as included in VoA's antivandal script. Any idea why this should be so? Pseudomonas 23:36, 12 September 2006 (UTC)
- This works for me at the moment, probably because I fixed your bug but forgot to thank you. Thanks! Lupin|talk|popups 08:12, 26 October 2006 (UTC)
[edit] wikiversity
Can you please add wikiversity to function setSiteInfo()
Thanks --v:User:Matteo
[edit] Namespaces nds-nl:
Could you please add the following namespaces for the nds-nl wikipedia?
"nds-nl": [m, "Speciaol", "Overleg", "Gebruker", "Overleg gebruker", "Wikipedie", "Overleg Wikipedie", "Ofbeelding", "Overleg ofbeelding", "MediaWiki", "Overleg MediaWiki", "Sjabloon", "Overleg sjabloon", "Help", "Overleg help", "Categorie", "Overleg categorie"],
I've simply copied the nl namespaces from this script and translated it, I don't know what the first item (m) stands for, so I don't know if that should be there. Thanks in advance, Erwin85 12:49, 9 October 2006 (UTC)
[edit] Software License?
What is the license for this software? I would love to copy and paste into other projects. Thanks, GChriss <always listening><c> 01:41, 24 October 2006 (UTC)
- I would like to license this under something like the GPL. However, it includes files from external sources with other licenses (eg BSD) or unclear licenses, so I don't know if I can do this. Of course, all content on wikipedia is supposedly GFDL anyway... but again, I don't know if this is legitimate here. I'd welcome advice on this. Lupin|talk|popups 08:17, 26 October 2006 (UTC)
-
- Talk to the Free Software Foundation: part of their job is to answer questions like this. :-) Try irc.freenode.net channel #gnu first. If you have no luck there, either contact them at the email address at http://www.fsf.org/licensing/education or contact me on my talk page so I can look at the code and provide you with advice. Cheers, --unforgettableid | how's my driving? 21:02, 8 December 2006 (UTC)
[edit] Other wikis
Does this work on other wikis? If I were to copy the code to my monobook.js file on say wikiquote or wikinews, would it work or would it have to be completely rewritten? Koweja 01:35, 28 November 2006 (UTC)
[edit] has anyone noticed
that it doesn't work at all anymore? --frothT C 18:05, 28 November 2006 (UTC)
- It works for me still! I used it to read this edit from my watchlist :) -- Renesis (talk) 18:06, 28 November 2006 (UTC)
[edit] Diff truncated for performance reasons
When viewing a popup difference, popups sometimes truncates the list of differences and shows Diff truncated for performance reasons at the bottom. This is well and good and it usually does the right thing, but every once in a while, I'm interested enough to see more, but not so much as to open another window. Would it be feasible to add a feature to indicate the user wants to see more? Like this:
- Diff truncated for performance reasons (show more) (show all)
— EncMstr 23:31, 12 December 2006 (UTC)
[edit] Default revert summary text
My monobook.js has, among other settings
popupRevertSummaryPrompt = true; popupQueriedRevertSummary = 'revert vandal [[special:contributions/$3|$3]] ([[user talk:$3|talk]]) to last version by '; popupQueriedRevertToPreviousSummary = 'revert vandal [[special:contributions/$3|$3]] ([[user talk:$3|talk]]) to last version by ';
When viewing a revert worthy popup difference, I click on actions then revert. Perhaps once out of ten times, the evil editor's ID correctly replaces $3 and all I have to do is add the previous editor's name at the end. The other nine times, $3 has the previous edit's editor ID—a surprisingly tedious edit to fix.
- Is something incorrectly set?
- Is there a way to get the message correct most of the time?
- Why does it not work the same way every time? I'm now certain I'm consistent: hovering the (diff) link on special:watchlist.
- Are there additional variables for substitution which might be of interest? Like $8 perhaps? :-)
- I'd like to select one of several messages: vandal, testing and blanking (for example). Any suggestions to make easier?
- Is there a way to make the popup summary confirmation dialog wider?
I'm primarily using SeaMonkey 1.0.6 on XP SP2, but observe identical behavior with FireFox 1.5.0.8. — EncMstr 23:31, 12 December 2006 (UTC)
[edit] Text edit box popups
I accidently stumbled across this feature of popups in text edit boxes: if a double square bracket enclosed string is highlighted, hovering the mouse cursor over it activates useful popup features. (Way cool, by the way. Thanks.) The only thing that was infuriating—until I understood the cause—is that highlighting must be done with the mouse—if it's done using the keyboard (for example, holding down shift while pressing the arrow keys), the highlight isn't magic enough. (Weird, eh?) — EncMstr 23:31, 12 December 2006 (UTC)