User talk:Ais523/votesymbols.js
functionality
[edit]I came across this from a link at Wikipedia:Templates_for_deletion/Log/2006_September_12#Voting.2Fpolling_templates as an alternative to the templates currently up for deletion. I'm interested in implementing this for myself, but can't seem to figure out how. Hoping somebody could help me. — pd_THOR | =/\= | 12:06, 13 September 2006 (UTC)
- This seems to only work in IE, as I've found out by accident. Is there any way to make this compatable with Firefox? — pd_THOR | =/\= | 15:17, 15 September 2006 (UTC)
- I found the IE-only code (it seems innerText is IE-only), and replaced it with something else that also works with IE, but is hopefully more portable. I don't have a copy of FireFox to test it on, though. --ais523 07:34, 25 September 2006 (UTC)
- Works just fine, now. Thanks! — pd_THOR | =/\= | 11:34, 25 September 2006 (UTC)
- I found the IE-only code (it seems innerText is IE-only), and replaced it with something else that also works with IE, but is hopefully more portable. I don't have a copy of FireFox to test it on, though. --ais523 07:34, 25 September 2006 (UTC)
Test image
[edit]When this is installed, a good place to test it is near the top of WP:SFD. It should look something like this:
How to use?
[edit]I included the script to my monobook, but it cannot work.--Alex S.H. Lin 05:44, 21 September 2007 (UTC)
- It ought to have worked. What went wrong? Did you get any JavaScript errors? --ais523 18:52, 2 January 2008 (UTC)
Update
[edit]The comment/note image url needs to be updated to http://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Symbol_comment_vote.svg/15px-Symbol_comment_vote.svg.png. Just letting you know. Love your scripts, thanks!
more symbols
[edit]Nice idea with this script. I like to see quickly votes in polls while I do not like using templates myself to illustrate them.
If you want to incoporate more symbols, there's a nice list at User:Misza13/vote - 52 Pickup (deal) 08:50, 14 January 2008 (UTC)
- I've looked at the list; it gets most of them already, and the others mostly seem implausible. (I'm using the Unsupport symbol for Delist at WP:FPC, because it seems appropriate there.) Do you know of any comments which miss symbols with the script which ought to have them, due to the symbol not being programmed? --ais523 10:45, 14 January 2008 (UTC)
- Not really. I've only just started using this script so I haven't had that much experience with it yet. Nice work, though. - 52 Pickup (deal) 20:41, 20 January 2008 (UTC)
- A few more things I'm seeing at DRV that don't have symbols: List (for things needing to go to XfD, similar to Relist); Speedy close and Close; and Restore (for undeleting articles improperly deleted). — The Hand That Feeds You:Bite 03:02, 23 May 2008 (UTC)
- Thanks for your suggestion. I've updated the script; if you bypass your cache to see the changes, all the bolded text in your comment above should have symbols now. --ais523 15:26, 24 May 2008 (UTC)
- ais, you rock! Thanks for taking my suggestions and your choices of icons look spot-on! — The Hand That Feeds You:Bite 17:21, 24 May 2008 (UTC)
- Thanks for your suggestion. I've updated the script; if you bypass your cache to see the changes, all the bolded text in your comment above should have symbols now. --ais523 15:26, 24 May 2008 (UTC)
Suggestion
[edit]Perhaps the vote symbols can incorporate the Vote Pictograms at commons:User:Norro/Voting. Just a suggestion. Glacier Wolf 03:30, 22 January 2008 (UTC)
I feel customized...
[edit]Is it possible to make the images customizeable? Say I want a different image, or allow to add a command and an accompanying picture.--Ipatrol (talk) 22:33, 26 January 2009 (UTC)
- The easiest way to do this is to make your own copy of the script, and change your copy accordingly. There aren't any tricks in the way the picture list works; just do more of the same thing. --ais523 12:18, 28 January 2009 (UTC)
Invalid XHTML with an easy fix
[edit]Hi! Your code is not quite XHTML valid. It's an easy fix, though. The line:
x+="<IMG SRC='"+vt[l]+"' /> "
Should be changed to:
x+='<img src="'+vt[l]+'" alt="" /> '
Better yet would be to fill in an actual value for the alt=""
attribute (like using the button name). Note also that I swapped the order of the single and double quotation marks. The XHTML should have the double quotes, and JavaScript should use the singles, unless that somehow breaks something (doesn't seem like it would in this case). In this day and age, there's no reason to have non-compliant code lurking around anymore. Thanks! --Willscrlt (→“¡¿Talk?!”) 04:08, 13 April 2009 (UTC)
- Alt probably should be blank here, as the images are deliberately redundant (that's the whole point), so replacing them with nothing on a browser that doesn't show images is correct. (Of course, it's a pretty moot point, as I can't think of any sane reason why someone with a browser that supports JS but not images would want to use this script in the first place.) I'll go and make the change. --ais523 19:52, 13 April 2009 (UTC)
Still being maintained?
[edit]Is this still being maintained? It doesn't appear to work at all in Google Chrome, nor does the AdminRights script. — The Hand That Feeds You:Bite 14:47, 3 November 2010 (UTC)
- It's currently at the stage of "I'll fix bugs, but not look for them, so you'll have to tell me about them if you want them fixed". It was written pre-Chrome, so I'm not really surprised that it doesn't work there at the moment. I wonder what goes wrong? --ais523 09:11, 4 November 2010 (UTC)
- Just tested in Chromium (web browser), and they both seem to work fine to me. I'm not sure I'll be able to do anything about your specific issue without more information as to what's going wrong in your specific case. Perhaps it's a conflict with a different script, rather than a browser issue? (To test, you could temporarily remove all your scripts from your monobook.js/vector.js except the script you wanted to test, bypass your cache, then see if the scripts worked then. Note that an incompatibility in any script can cause other scripts on the page to stop working, even apparently unrelated ones.) --ais523 11:24, 4 November 2010 (UTC)
- Aha! I think I found the issue. I still had it in my monobook.js, but Wikipedia switched to Vector. So I had to install it into the new .js to get it to work. :P Really wish these scripts just applied to whatever skin you were in. — The Hand That Feeds You:Bite 15:57, 4 November 2010 (UTC)
- Just tested in Chromium (web browser), and they both seem to work fine to me. I'm not sure I'll be able to do anything about your specific issue without more information as to what's going wrong in your specific case. Perhaps it's a conflict with a different script, rather than a browser issue? (To test, you could temporarily remove all your scripts from your monobook.js/vector.js except the script you wanted to test, bypass your cache, then see if the scripts worked then. Note that an incompatibility in any script can cause other scripts on the page to stop working, even apparently unrelated ones.) --ais523 11:24, 4 November 2010 (UTC)
SSL by default
[edit]Now Wikipedia is has moved to secure-by-default, could you make a change to avoid the security mix, please?
All you need to do is to change
var vs= "http://upload.wikimedia.org/wikipedia/commons/thumb/9/94/Symbol_support_vote.svg/15px-Symbol_support_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/d/d0/Symbol_keep_vote.svg/15px-Symbol_keep_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Symbol_oppose_vote.svg/15px-Symbol_oppose_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/8/89/Symbol_delete_vote.svg/15px-Symbol_delete_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/8/89/Symbol_neutral_vote.svg/15px-Symbol_neutral_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Symbol_merge_vote.svg/15px-Symbol_merge_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/5/50/Symbol_move_vote.svg/15px-Symbol_move_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/0/0c/Symbol_redirect_vote.svg/15px-Symbol_redirect_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Symbol_opinion_vote.svg/15px-Symbol_opinion_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Symbol_comment_vote.svg/15px-Symbol_comment_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Symbol_unsupport_vote.svg/15px-Symbol_unsupport_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Symbol_question.svg/15px-Symbol_question.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Symbol_divide_vote.svg/15px-Symbol_divide_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/5/54/Symbol_wait.svg/15px-Symbol_wait.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Face-grin.svg/15px-Face-grin.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Symbol_support2_vote.svg/15px-Symbol_support2_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/3/3b/Symbol_no_support_vote.svg/15px-Symbol_no_support_vote.svg.png";
to read
var vs= "//upload.wikimedia.org/wikipedia/commons/thumb/9/94/Symbol_support_vote.svg/15px-Symbol_support_vote.svg.png#"+ "//upload.wikimedia.org/wikipedia/commons/thumb/d/d0/Symbol_keep_vote.svg/15px-Symbol_keep_vote.svg.png#"+ "//upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Symbol_oppose_vote.svg/15px-Symbol_oppose_vote.svg.png#"+ "//upload.wikimedia.org/wikipedia/commons/thumb/8/89/Symbol_delete_vote.svg/15px-Symbol_delete_vote.svg.png#"+ "//upload.wikimedia.org/wikipedia/commons/thumb/8/89/Symbol_neutral_vote.svg/15px-Symbol_neutral_vote.svg.png#"+ "//upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Symbol_merge_vote.svg/15px-Symbol_merge_vote.svg.png#"+ "//upload.wikimedia.org/wikipedia/commons/thumb/5/50/Symbol_move_vote.svg/15px-Symbol_move_vote.svg.png#"+ "//upload.wikimedia.org/wikipedia/commons/thumb/0/0c/Symbol_redirect_vote.svg/15px-Symbol_redirect_vote.svg.png#"+ "//upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Symbol_opinion_vote.svg/15px-Symbol_opinion_vote.svg.png#"+ "//upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Symbol_comment_vote.svg/15px-Symbol_comment_vote.svg.png#"+ "//upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Symbol_unsupport_vote.svg/15px-Symbol_unsupport_vote.svg.png#"+ "//upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Symbol_question.svg/15px-Symbol_question.svg.png#"+ "//upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Symbol_divide_vote.svg/15px-Symbol_divide_vote.svg.png#"+ "//upload.wikimedia.org/wikipedia/commons/thumb/5/54/Symbol_wait.svg/15px-Symbol_wait.svg.png#"+ "//upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Face-grin.svg/15px-Face-grin.svg.png#"+ "//upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Symbol_support2_vote.svg/15px-Symbol_support2_vote.svg.png#"+ "//upload.wikimedia.org/wikipedia/commons/thumb/3/3b/Symbol_no_support_vote.svg/15px-Symbol_no_support_vote.svg.png";
That is, just remove http:
from the URLs. Personally, I'd move //upload.wikimedia.org/wikipedia/commons/thumb/
into the image tag rather than the URL array and remove the trailing #
characters as well, so the array just contains the bits that differ, but that's just me ;o)
Thanks! — OwenBlacker (Talk) 12:42, 29 September 2013 (UTC)
- Yeah, it keeps giving me mixed-protocol errors whenever I try to use https... meteor_sandwich_yum (talk) 02:18, 22 February 2014 (UTC)
Done (years ago, but I forgot to note this at the time) --ais523 13:14, 1 August 2022 (UTC)
Legacy JavaScript
[edit]Hello! This script has been detected as using deprecated parameters that need to be replaced with the updated version. Examples include addOnloadHook( ... )
needs to be replaced with $( function() { ... } )
; all wgGlobalVariables need to be properly gotten with mw.config.get( 'wgGlobalVariable' )
; and addPortletLink
needs to be called with mw.util.addPortletLink
. Please see MW:ResourceLoader/Legacy JavaScript for details. Thank you. — {{U|Technical 13}} (e • t • c)
20:29, 19 January 2015 (UTC)
- Just leaving a note here to note that someone else made this change (between the request and when I noticed it). --ais523 13:15, 1 August 2022 (UTC)