User:Tenryuu/common.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
![]() | The accompanying .css page for this skin is at User:Tenryuu/common.css. |
// install [[Wikipedia:User:Cacycle/wikEd]] in-browser text editor
(function ()
{
var script = document.createElement('script');
script.src = '//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js&action=raw&ctype=text/javascript';
script.async = true;
document.getElementsByTagName('head')[0].appendChild(script);
}
) ();
// install word count script
mw.loader.load('//en.wikipedia.org/w/index.php?title=User%3ADr+pda%2Fprosesize.js&action=raw&ctype=text/javascript'); // [[User:Dr pda/prosesize.js]]
//Teahouse scripts
importScript("User:Writ Keeper/Scripts/teahouseUtility.js"); // Gives one-click option to add Teahouse invitation or talkback to a user
importScript("User:Writ Keeper/Scripts/teahouseTalkbackLink.js"); // Adds a talkback link to signatures on the Teahouse
importScript("User:Ocaasi/WikiLoveinstallscript.js");// Adds Teahouse Badges to WikiLove
//reply-link
importScript( 'User:Enterprisey/reply-link.js' ); // Backlink: [[User:Enterprisey/reply-link.js]]
//voting
// [[User:Ais523/votesymbols.js]]
// Code for adding icons to !votes in AfDs, RfAs, etc.. Doesn't affect the page, just
// shows the icons when this code is installed.
// Please see [[:Image:Votesymbols.js-enhanced_SfD.png]] for copyright info on the images that are added.
function lowerNoPunct(s)
{
return s.toLowerCase().split('.').join('').split(',').join('').split(':').join('').split(';').join('').split('+').join('');
}
$(function() {
if(mw.config.get('wgNamespaceNumber')===0) return; //avoid article space, generally speaking
var vs=
"/media/wikipedia/commons/thumb/9/94/Symbol_support_vote.svg/20px-Symbol_support_vote.svg.png#"+
//above is 0
"/media/wikipedia/commons/thumb/d/d0/Symbol_keep_vote.svg/20px-Symbol_keep_vote.svg.png#"+
"/media/wikipedia/commons/thumb/7/7f/Symbol_oppose_vote.svg/20px-Symbol_oppose_vote.svg.png#"+
"/media/wikipedia/commons/thumb/9/94/Symbol_delete_vote_Red.svg/20px-Symbol_delete_vote_Red.svg.png#"+
"/media/wikipedia/commons/thumb/8/89/Symbol_neutral_vote.svg/20px-Symbol_neutral_vote.svg.png#"+
"/media/wikipedia/commons/thumb/b/b0/Symbol_merge_vote.svg/20px-Symbol_merge_vote.svg.png#"+
"/media/wikipedia/commons/thumb/5/50/Symbol_move_vote.svg/20px-Symbol_move_vote.svg.png#"+
"/media/wikipedia/commons/thumb/0/0c/Symbol_redirect_vote.svg/20px-Symbol_redirect_vote.svg.png#"+
"/media/wikipedia/commons/thumb/b/ba/Symbol_opinion_vote.svg/20px-Symbol_opinion_vote.svg.png#"+
"/media/wikipedia/commons/thumb/8/8c/Symbol_information_vote.svg/20px-Symbol_information_vote.svg.png#"+
"/media/wikipedia/commons/thumb/f/f6/Symbol_unsupport_vote.svg/20px-Symbol_unsupport_vote.svg.png#"+
//above is 10
"/media/wikipedia/commons/thumb/e/e0/Symbol_question.svg/20px-Symbol_question.svg.png#"+
"/media/wikipedia/commons/thumb/0/0d/Symbol_split_vote.svg/20px-Symbol_split_vote.svg.png#"+
"/media/wikipedia/commons/thumb/5/54/Symbol_wait.svg/20px-Symbol_wait.svg.png#"+
"/media/wikipedia/commons/thumb/b/bc/Face-grin.svg/20px-Face-grin.svg.png#"+
"/media/wikipedia/commons/thumb/f/f4/Symbol_userfy_vote.svg/20px-Symbol_userfy_vote.svg.png#"+
"/media/wikipedia/commons/thumb/3/3b/Symbol_no_support_vote.svg/20px-Symbol_no_support_vote.svg.png#"+
"/media/wikipedia/commons/thumb/4/41/Wikipedia_dislike.png/20px-Wikipedia_dislike.png#"+
"/media/wikipedia/commons/thumb/6/68/Wikipedia_like_SVG.svg/20px-Wikipedia_like_SVG.svg.png#"+
"/media/wikipedia/commons/thumb/8/89/Symbol_remind_vote.svg/20px-Symbol_remind_vote.svg.png#"+
"/media/wikipedia/commons/thumb/d/d7/Symbol_Translate.svg/20px-Symbol_Translate.svg.png#"+
//above is 20
"/media/wikipedia/commons/thumb/d/db/Symbol_list_class.svg/20px-Symbol_list_class.svg.png#"+
"/media/wikipedia/commons/thumb/2/2a/Symbol_dab_class.svg/20px-Symbol_dab_class.svg.png#"+
"/media/wikipedia/commons/thumb/6/61/Symbol_abstain_vote.svg/20px-Symbol_abstain_vote.svg.png#"+
"/media/wikipedia/commons/thumb/7/73/Symbol_lightbulb.svg/20px-Symbol_lightbulb.svg.png#"+
"/media/wikipedia/commons/thumb/a/ae/Reload_icon.svg/20px-Reload_icon.svg.png#"+
"/media/wikipedia/commons/thumb/7/74/Pictogram_voting_left_right_arrow.svg/20px-Pictogram_voting_left_right_arrow.svg.png#"+
"/media/wikipedia/commons/thumb/3/3a/Symbol_point_of_order.svg/20px-Symbol_point_of_order.svg.png#"+
"/media/wikipedia/commons/thumb/0/04/Symbol_wait_alternative.svg/20px-Symbol_wait_alternative.svg.png#"+
"/media/wikipedia/commons/thumb/f/f7/Symbol_arrow_down.svg/20px-Symbol_arrow_down.svg.png#"+
"/media/wikipedia/commons/thumb/2/28/Symbol_arrow_up.svg/20px-Symbol_arrow_up.svg.png#"+
//above is 30
"/media/wikipedia/commons/thumb/c/ca/Symbol_possible_vote.svg/20px-Symbol_possible_vote.svg.png#"+
"/media/wikipedia/commons/thumb/4/4d/Symbol_book_class.svg/20px-Symbol_book_class.svg.png#"+
"/media/wikipedia/commons/thumb/e/e5/Symbol_version_newer.svg/20px-Symbol_version_newer.svg.png#"+
"/media/wikipedia/commons/thumb/7/7f/Symbol_version_generic.svg/20px-Symbol_version_generic.svg.png#"+
"/media/wikipedia/commons/thumb/4/4a/Symbol_vote_defer.svg/20px-Symbol_vote_defer.svg.png#"+
"/media/wikipedia/commons/thumb/d/d3/Bouncing_Snowball.png/20px-Bouncing_Snowball.png#"+
"/media/wikipedia/commons/thumb/9/9b/Symbol_star_FA_gold.svg/20px-Symbol_star_FA_gold.svg.png#"
var vt=vs.split("#");
var la=[];
la['support']=0; la['endorse']=0; la['include']=0; la['yes']=0; la['agree']=0
la['keep']=1; la['allow']=1; la['permit']=1; la['kept']=1
la['oppose']=2; la['overturn']=2; la['object']=2; la['disallow']=2; la['exclude']=2; la['no']=2; la['disagree']=2; la['remove']=2
la['delete']=3; la['deleting']=3; la['deleted']=3
la['neutral']=4;
la['merge']=5; la['upmerge']=5; la['merging']=5
la['move']=6; la['userfy']=6; la['transwiki']=6;
la['redirect']=7; la['retarget']=7;
la['opinion']=8; la['relist']=8; la['subst']=8; la['salt']=8; la['change']=8; la['list']=8;
// Note that icon 8 on the list is often used for debate-specific !votes
la['comment']=9; la['update']=9; la['note']=9; la['updated']=9
la['delist']=10;
la['question']=11;
la['split']=12; la['set index']=12; la['SIA']=12;
la['wait']=13; la['waiting']=13
la['bjaodn']=14;
la['convert']=15; la['change']=15
la['close']=16;
la['dislike']=17;
la['like']=18;
la['remind']=19; la['reminder']=19;
la['rename']=20; la['translate']=20; la['renaming']=20; la['renamed']=20
la['list']=21; la['listify']=21
la['disambiguation']=22; la['disambiguate']=22; la['dab']=22; la['dabify']=22; la['disambig']=22
la['abstain']=23; la['recuse']=23
la['idea']=24; la['suggestion']=24
la['revive']=25; la['restore']=25; la['undelete']=25; la['reviving']=25
la['mixed']=26; la['ambivalent']=26; la['maybe']=26
la['propose']=27; la['proposal']=27; la['proposition']=27; la['proposed']=27
la['speedy']=28; la['speedily']=28
la['weak']=29; la['demote']=29
la['strong']=30; la['promote']=30
la['conditional']=31
la['reason']=32; la['rationale']=32
la['lean']=33; la['leaning']=33; la['mostly']=33
la['tentative']=34; la['tentatively']=34
la['reverse']=35
la['snow']=36
la['verdict']=37; la['outcome']=37; la['result']=37
var btc=document.body.getElementsByTagName("B");
i=btc.length;
while(i--)
{
var j,k;
j=btc[i].innerHTML.split("<").join(" ").split(">").join(" ").split("/").join(" ").split(" ");
k=0;
var x="";
while(k<j.length)
{
if(lowerNoPunct(j[k])=="don't"||lowerNoPunct(j[k])=='not'
||lowerNoPunct(j[k])=='without') break;
var l=la[lowerNoPunct(j[k])];
if(l!==undefined)
{
x+='<img src="'+vt[l]+'" alt="" /> '
}
k++;
}
if(x!=="") btc[i].innerHTML=x+btc[i].innerHTML;
}
});
//[[Category:Wikipedia scripts]]
importScript('User:SD0001/find-archived-section.js'); // Backlink: [[User:SD0001/find-archived-section.js]]
importScript('User:DannyS712/DiscussionCloser.js'); // Backlink: [[User:DannyS712/DiscussionCloser.js]]