User:Fetchcomms/monobook.js

From wikishia

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
//Detect IE5.5+
if (navigator.appVersion.indexOf("MSIE")==-1)
{
importScript('User:Lightmouse/monobook.js/script.js');
importScript('User:Dr_pda/prosesize.js'); //[[User:Dr_pda/prosesize.js]]
importScript('User:User:Mr.Z-man/closeAFD.js');
importScript('User:TheJosh/Scripts/NewPagePatrol.js');
importScript('User:User:Animum/easyblock.js');
importScript('User:AzaToth/twinkle.js');
importScript('User:AzaToth/morebits.js');
importScript('User:Betacommand/compare.js');
importScript('User:Ioeth/friendlytag.js');
importScript('User:Ioeth/friendlyshared.js');
importScript('User:Ioeth/friendlywelcome.js');
importScript('User:AzaToth/salt.js');
importScript('[[User:Ioeth/friendly.js]]');
importScript('User:Voice_of_All/Addtabs/monobook.js');
importScript('User:Misza13/statusChanger.js');
importScript('User:Misza13/viewSource.js');
importScript('User:Lupin/recent2.js');
importScript('User:Mixwell/newpages.js');
importScript('User:AWeenieMan/furme.js');
importScript('User:AWeenieMan/furmeScroller.js');
importScript('User:Paranomia/simplevote.js');
importScript('User:Mixwell/closeafd.js');
importScript('User:Mixwell/editcount.js');
importScript('User:Krimpet/CH2.js');
importScript('User:Digitalme/aiv.js');
importScript('User:Mixwell/autocopyvio.js');
// [[User:Lupin/popups.js]]
importScript('User:Lupin/popups.js');
// Helper tools
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Addtabs/monobook.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//
importScript('User:AzaToth/twinkle.js');
 
TwinkleConfig = {
        revertMaxRevisions              :       50,
        userTalkPageMode                :       'tab',
        showSharedIPNotice              :       true,
        openTalkPage                    :       [ 'agf', 'norm', 'vand' ],
        openTalkPageOnAutoRevert        :       false,
        openAOLAnonTalkPage             :       false,
        summaryAd                       :       " using [[WP:TWINKLE|TW]]",
        deletionSummaryAd               :       " using [[WP:TWINKLE|TW]]",
        protectionSummaryAd             :       " using [[WP:TWINKLE|TW]]",
        watchSpeedyPages                :       [ 'g1', 'g2', 'g10', 'g11', 'g12', 'a1', 'a7', 'i3', 'i4', 'i5', 'i6', 'i7', 'u3', 't1' ],
        watchProdPages                  :       true,
        openUserTalkPageOnSpeedyDelete  :       [ 'g1', 'g2', 'g10', 'g11', 'g12', 'a1', 'a7', 'i3', 'i4', 'i5', 'i6', 'i7', 'u3', 't1' ],
        watchRevertedPages              :       [ 'agf', 'norm', 'vand', 'torev' ],
        markRevertedPagesAsMinor        :       [ 'agf', 'norm', 'vand', 'torev' ],
        deleteTalkPageOnDelete          :       false,
        watchWarnings                   :       true,
        markAIVReportAsMinor            :       true,
        markSpeedyPagesAsMinor          :       false,
        markProdPagesAsMinor            :       true,
        confirmUsernameToAIV            :       true,
        toolboxButtons                  :       [ ]
};
 
 
 
addOnloadHook(addcountedit);
 
addOnloadHook(function() {
  //add to tb: {{fullurl:Wikipedia:Articles for deletion/Log/{{CURRENTYEAR}}_{{CURRENTMONTHNAME}}_{{CURRENTDAY}}|action=edit}}
  var now = new Date(); var url = '';
  var mn = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
  url += wgServer + wgScript + '?title=Wikipedia:Articles_for_deletion/Log/';
  url += now.getUTCFullYear() + '_' + mn[now.getUTCMonth()] + '_' + now.getUTCDate();
  addPortletLink('p-tb', url, 'AFD/today', 'ca-afd', 'AFD for today');
})
 
//</nowiki></pre>
 
if(wgNamespaceNumber==2||wgNamespaceNumber==3) addOnloadHook(function() {
  var n = wgTitle;
  if(n.indexOf('/')!=-1)  n = n.substring(0,wgTitle.indexOf('/'))
  addPortletLink('p-tb', wgScript + '?title=Special:Listusers&username=' + n,'User Search','t-usersearch','Special:Listusers&username=' + n);
})
 
importScript('User:Mixwell/editcount.js‎ ');
 
//this helps automate AfD closing by adding a 'close' tab to AfD debates
//written by [[User:Johnleemk]] based on [[Wikipedia:WikiProject User scripts/Scripts/test-n.js]] by [[User:Celestianpower]]
 
function autoafd_result()
{
  var close = prompt("Result of debate?")
  var f = document.editform, t = f.wpTextbox1;
  t.value = t.value.split('{{REMOVE THIS TEMPLATE WHEN CLOSING THIS AfD').join('{{ns:0');
  t.value = "{{subst:" + "at" + "}} '''" + close + "'''. " + "~" + "~" + "~" + "~" + '\n' + '\n' + t.value;
  if (t.value.length > 0)
    t.value += '\n';
  t.value += "{{subst:" + "ab" + "}}";
  f.wpSummary.value = "Closing debate; result was " + close;
}
 
function autoafd_relist()
{
  var f = document.editform, t = f.wpTextbox1;
  if (t.value.length > 0)
    t.value += '\n';
  t.value += "{{subst:" + "relist" + "|~" + "~" + "~" + "~}}";
  f.wpSummary.value = "Relisting debate";
}
 
function autoafd_keep()
{
  var date = prompt("Nomination was made when?")
  var votepage = prompt("Vote page is? (Enter 'd' for default.)")
  var f = document.editform, t = f.wpTextbox1;
 
    // If default votepage...
    if (votepage=="d")
      {
        var temp = document.editform.action.split("/w/index.php?title=");
        var temp = temp[1].split("&action=submit");
        var temp = temp[0].substring(5);
        var votepage = temp;
      }
 
  t.value = "{{" + "oldafdfull" + "|date=" + date + "|votepage=" + votepage + "}}" + '\n' + '\n' + t.value;
  f.wpSummary.value = "Article survived AfD";
}
 
function autoafd_no_consensus()
{
  var date = prompt("Nomination was made when?")
  var votepage = prompt("Vote page is? (Enter 'd' for default.)")
  var f = document.editform, t = f.wpTextbox1;
 
    // If default votepage...
    if (votepage=="d")
      {
        var temp = document.editform.action.split("/w/index.php?title=");
        var temp = temp[1].split("&action=submit");
        var temp = temp[0].substring(5);
        var votepage = temp;
      }
 
  t.value = "{{" + "oldafdfull" + "|date=" + date + "|result='''no consensus'''|votepage=" + votepage + "}}" + '\n' + '\n' + t.value;
  f.wpSummary.value = "Article survived AfD with no consensus";
}
 
function autoafd_redirect()
{
  var date = prompt("Nomination was made when?")
  var redirect = prompt("Redirect to?")
  var votepage = prompt("Vote page is? (Enter 'd' for default.)")
  var f = document.editform, t = f.wpTextbox1;
 
    // If default votepage...
    if (votepage=="d")
      {
        var temp = document.editform.action.split("/w/index.php?title=");
        var temp = temp[1].split("&action=submit");
        var temp = temp[0].substring(5);
        var votepage = temp;
      }
 
  t.value = "{{" + "oldafdfull" + "|date=" + date + "|result='''redirect to [[" + redirect + "]]'''|votepage=" + votepage + "}}" + '\n' + '\n' + t.value;
  f.wpSummary.value = "Article redirected to [[" + redirect + "]] as per AfD";
}
 
function autoafd_merge()
{
  var date = prompt("Nomination was made when?")
  var redirect = prompt("Merge and redirect to?")
  var votepage = prompt("Vote page is? (Enter 'd' for default.)")
  var f = document.editform, t = f.wpTextbox1;
 
    // If default votepage...
    if (votepage=="d")
      {
        var temp = document.editform.action.split("/w/index.php?title=");
        var temp = temp[1].split("&action=submit");
        var temp = temp[0].substring(5);
        var votepage = temp;
      }
 
  t.value = "{{" + "oldafdfull" + "|date=" + date + "|result='''merge and redirect to [[" + redirect + "]]'''|votepage=" + votepage + "}}" + '\n' + '\n' + t.value;
  f.wpSummary.value = "Article merged and redirected to [[" + redirect + "]] as per AfD";
}
 
function autoafd_other()
{
  var date = prompt("Nomination was made when?")
  var result = prompt("Result was?")
  var votepage = prompt("Vote page is? (Enter 'd' for default.)")
  var f = document.editform, t = f.wpTextbox1;
 
    // If default votepage...
    if (votepage=="d")
      {
        var temp = document.editform.action.split("/w/index.php?title=");
        var temp = temp[1].split("&action=submit");
        var temp = temp[0].substring(5);
        var votepage = temp;
      }
 
  t.value = "{{" + "oldafdfull" + "|date=" + date + "|result='''" + result + "'''|votepage=" + votepage + "}}" + '\n' + '\n' + t.value;
  f.wpSummary.value = "AfDed; result was " + result;
}
 
function autoafd_add_afd_tabs()
{
  // Only add for pages with the right string somewhere in the title
  if (document.title.indexOf("Editing Wikipedia:Articles for deletion/") != -1)
    {
      addPortletLink('p-cactions', 'javascript:autoafd_result()', "close");
      addPortletLink('p-cactions', 'javascript:autoafd_relist()', "relist");
    }
  if (document.title.indexOf("Editing Talk:") != -1)
    {
      addPortletLink('p-cactions', 'javascript:autoafd_keep()', "keep");
      addPortletLink('p-cactions', 'javascript:autoafd_no_consensus()', "no consensus");
      addPortletLink('p-cactions', 'javascript:autoafd_redirect()', "redirect");
      addPortletLink('p-cactions', 'javascript:autoafd_merge()', "merge");
      addPortletLink('p-cactions', 'javascript:autoafd_other()', "other");
    }
}
 
addOnloadHook(autoafd_add_afd_tabs);
 
//end AfD closing script
 
//
 
importScript('User:Gracenotes/rollback.js');
showbydefault = true;
importScript('User:Mr.Z-man/patrollinks.js');
importScript('User:Ais523/topcontrib.js');
//
// Edit tools for the vandal whack-a-mole game
// [[User:Kbh3rd/whackamole.js]] - please include this line
//
document.write('<script type="text/javascript" src="' 
+ 'http://en.wikipedia.org/w/index.php?title=User:Kbh3rd/whackamole.js' 
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 
// [[User:Henrik/live-edit-counter]]
importScript('User:Henrik/js/live-edit-counter.js');
 
// Extra edit buttons, [[User:MarkS/Extra_edit_buttons]]
importScript('User:MarkS/extraeditbuttons.js'); //[[User:MarkS/extraeditbuttons.js]]
 
/**** welcome new user ****/
document.write('<script type="text/javascript"' +
'src="http://en.wikipedia.org/w/index.php?title=User:Nmajdan/welcome_newuser.js' +
'&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 
//The welcome template you are wanting to use
var welcome_msg = 'welcomeg&#124;name=FastLizard4'
 
 
// [[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('');
}
 
addOnloadHook(function() {
  if(wgNamespaceNumber==-2) return; //avoid user space, generally speaking
  if(wgNamespaceNumber==-1) return; //avoid user space, generally speaking
  if(wgNamespaceNumber==1) return; //avoid user space, generally speaking
  if(wgNamespaceNumber==2) return; //avoid user space, generally speaking
  if(wgNamespaceNumber==3) return; //avoid user space, generally speaking
  if(wgNamespaceNumber==6) return; //avoid user space, generally speaking
  if(wgNamespaceNumber==7) return; //avoid user space, generally speaking
  if(wgNamespaceNumber==8) return; //avoid user space, generally speaking
  if(wgNamespaceNumber==9) return; //avoid user space, generally speaking
  if(wgNamespaceNumber==10) return; //avoid user space, generally speaking
  if(wgNamespaceNumber==11) return; //avoid user space, generally speaking
  if(wgNamespaceNumber==12) return; //avoid user space, generally speaking
  if(wgNamespaceNumber==13) return; //avoid user space, generally speaking
  if(wgNamespaceNumber==14) return; //avoid user space, generally speaking
  if(wgNamespaceNumber==15) return; //avoid user space, generally speaking
  if(wgNamespaceNumber==100) return; //avoid user space, generally speaking
  if(wgNamespaceNumber==101) return; //avoid user space, generally speaking
  if(wgNamespaceNumber==0) return; //avoid article space, generally speaking
  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/b/bc/Symbol_note.svg/15px-Symbol_note.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";
  var vt=vs.split("#");
  var la=new Array();
  la['support']=0; la['endorse']=0;
  la['keep']=1;
  la['oppose']=2; la['overturn']=2; la['object']=2;
  la['delete']=3;
  la['neutral']=4;
  la['merge']=5; la['upmerge']=5;
  la['move']=6; la['rename']=6; la['userfy']=6; la['transwiki']=6;
  la['redirect']=7;
  la['opinion']=8;
  la['relist']=8;
  la['subst']=8; 
  la['salt']=8;
  la['change']=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['delist']=10;
  la['question']=11;
  la['split']=12;
  la['wait']=13;
  la['bjaodn']=14;
 
  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])=='no'||lowerNoPunct(j[k])=='without') break;
      var l=la[lowerNoPunct(j[k])];
      if(l!=undefined)
      {
        x+="<IMG SRC='"+vt[l]+"' /> "
      }
      k++;
    }
    if(x!="") btc[i].innerHTML=x+btc[i].innerHTML;
  }
});
//[[Category:Wikipedia scripts]]
 
 
 
// New page patrol
importScript('User:TheJosh/Scripts/NewPagePatrol.js');
importScript('User:Misza13/viewSource.js');
importScript('User:Ioeth/friendly.js');
FriendlyConfig = {
summaryAd                       :       " using [[WP:FRIENDLY|Friendly]]",
topWelcomes                     :       false,
watchWelcomes                   :       false,
markWelcomesAsMinor             :       false,
insertHeadings                  :       true,
welcomeHeading                  :       "== Welcome to Wikipedia! ==",
insertUsername                  :       true,
insertSignature                 :       true,
quickWelcomeMode                :       "semiauto",
quickWelcomeTemplate            :       "Welcomeg",
groupByDefault                  :       true,
watchTaggedPages                :       true,
markTaggedPagesAsMinor          :       false
};
//Interiot's javascript edit counter
if (document.title.indexOf('User:Interiot/Tool2/code.js') != -1) {
document.write('<script type="text/javascript" src="' 
+ 'http://en.wikipedia.org/w/index.php?title=User:Interiot/Tool2/code.js' 
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); }
importScript('User:Mr.Z-man/gsearch.js');
importScript('User:AWeenieMan/furme.js');
importScript('User:AWeenieMan/furmeScroller.js');
importScript('User:Mr.Z-man/refbuttons.js');
importScript('User:Smith609/toolbox.js');
}