User:Phaedriel/monobook.js

/* */ // User:Lupin/popups.js

document.write(' ');

function addlilink(tabs, url, name, id, title, key){ var na = document.createElement('a'); na.href = url; na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); if(id) li.id = id; li.appendChild(na); tabs.appendChild(li); na.accesskey = key; var pref = 'alt-'; if(((clientPC.indexOf('AppleWebKit')!=-1) && (clientPC.indexOf('spoofer')==-1)) || navigator.userAgent.toLowerCase.indexOf( 'mac' ) != -1 ) pref = 'control-'; if(clientPC.indexOf('opera')!=-1) pref = 'shift-esc-'; if(key && title) na.title = title + ' [' + pref + key + ']'; else if(title) na.title = title; else if(key) na.title = '[' + pref + key + ']'; return li; }

function addTab(url, name, id, title, key){ var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; addlilink(tabs, url, name, id, title, key); }

function getPname { z=document.getElementById("content").childNodes; for (var n=0;n '); }

winc('User:Voice_of_All/Addtabs/monobook.js'); // Helper tools winc('User:Cactus.man/Scripts/MoreTabs.js');        // Additional tabs for user & project pages winc('User:Voice_of_All/Revert/monobook.js'); // Diff page links winc('User:Voice_of_All/Deletion/monobook.js'); // AfD/PfD/Copyvio and tagging tabs winc('User:VoA/monobook.js'); // Admin-like RC Patrol tools

//

// CSD AutoReason document.write(' ');

importScript('User:Steel359/protection.js'); // Admin warning tools document.write(' ');

// From code by raylu // // // This script adds a "Australia Deletion" tab to the top of article pages // when in edit mode. It is disabled for the User namespace.

function dodeletion { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value + '\n{' + '{' + 'subst' + ':' + 'delsort' + '|' + 'Australia' + '}' + '}' + ' ' + '--' + ' ' + '~' + '~' + '~' + '~'; document.editform.wpSummary.value = 'Tagged as a Australia-related deletion.'; document.editform.wpMinoredit.checked = true; document.editform.submit; }

function adddeletion { addTab("javascript:dodeletion", "Australia deletion", "ca-Australiadeletion", "Australia Deletion", ""); akeytt; }

addOnloadHook(function { if (document.title.indexOf("User:") != -1 || document.title.indexOf("User talk:") != -1) {     return;  }  if (document.title.indexOf("Editing ") != -1) {  addOnloadHook(adddeletion);  } });

function addTab(url, name, id, title, key){ var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; return addlilink(tabs, url, name, id, title, key) };

function addlilink(tabs, url, name, id, title, key){ var na = document.createElement('a'); na.href = url; na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); if(id) li.id = id; li.appendChild(na); tabs.appendChild(li); if(id) {       if(key && title) {           ta[id] = [key, title]; }       else if(key) {           ta[id] = [key, '']; }       else if(title) {           ta[id] = ['', title]; }   }    // re-render the title and accesskeys from existing code in wikibits.js    akeytt; return li; }

importScript('User:Lucasbfr/prodExpired.js');

//Please adjust the following variables according to when you want to end your break: var year = 2007; //YYYY var month = 06; //MM var day = 01; //DD var hour = 10; //HH var minute = 00; //MM var second = 00; //SS

function EnforceWikiBreak { var currentdate = new Date; var enforced_break_end = new Date(year,changemonth,day,hour,minute,second); if (currentdate > enforced_break_end) { // alert ("Welcome back from your enforced wikibreak!"); } else { alert ("Enforced wikibreak until " + enforced_break_end.toLocaleString + " (currently " + currentdate.toLocaleString + "). Bye!"); window.location.href = ("http://"+document.location.host+"/w/index.php?title=Special:Userlogout&returnto=Main_Page"); } }

function changemonth { //thing to subtract 1 from the month. you can't use month-1 because it removes the '0' from the front if(month==01) return 00; if(month==02) return 01; if(month==03) return 02; if(month==04) return 03; if(month==05) return 04; if(month==06) return 05; if(month==07) return 06; if(month==08) return 07; if(month==09) return 08; if(month==10) return 09; if(month==11) return 10; if(month==12) return 11; return 00; }

addOnloadHook(function { EnforceWikiBreak; });