User:Werdan7/monobook.js

importScript('User:Mr.Z-man/rollbackSummary.js'); importScript('Wikipedia:WikiProject_User_scripts/Scripts/RBL_check');

//===========WikiProject_User_scripts/Scripts/Time================ insertBeforeNum = 7; insertBeforeArr = new Array("","pt-userpage","pt-mytalk","pt-preferences","pt-watchlist","pt-mycontris","pt-logout",""); insertBefore = insertBeforeArr[insertBeforeNum];

function makeTime { var li = document.createElement( 'li' ); li.id = 'pt-time';

var mySpan = document.createElement( 'span' ); mySpan.appendChild( document.createTextNode( 'date and time' ) );

li.appendChild( mySpan );

if ( insertBefore ) {   var before = document.getElementById( insertBefore ); before.appendChild( li, before ); } else // append to end (right) of list {   document.getElementById( 'pt-logout' ).parentNode.appendChild( li ); }

getTime; }

if     ( window.addEventListener ) window.addEventListener ( 'load', makeTime, false ); else if ( window.attachEvent     ) window.attachEvent      ( 'onload', makeTime      );

function getTime {   var time    = new Date; var date   = time.getUTCDate; var months = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' '); month  = months[time.getUTCMonth]; var year   = time.getUTCFullYear; var hours  = '0' + time.getUTCHours; hours  = hours.substr(hours.length-2, hours.length); var minutes = '0' + time.getUTCMinutes; minutes = minutes.substr(minutes.length-2, minutes.length); var curTime = hours + ":" + minutes + ", " + date + " " + month + " " + year + " (UTC)"; datePlace  = document.getElementById('pt-time').childNodes[0].childNodes[0]; datePlace.replaceData(0, datePlace.length, curTime); doTime     = window.setTimeout("getTime", 60000); }

//=============Lupins antivandal tool========================================= // Script from User:Lupin/recent2.js mw.loader.load(            'https://en.wikipedia.org/w/index.php?title=User:Lupin/recent2.js'             + '&action=raw&ctype=text/javascript&dontcountme=s'); //=========popups========================================================= // User:Lupin/popups.js

mw.loader.load(            'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'             + '&action=raw&ctype=text/javascript&dontcountme=s');

//===Voice of All======Addtabs=============================================== // User:Voice_of_All/Addtabs/monobook.js //////////////////////////////////////////////////////////////// // =-=-=- HELPER FUNCTIONS -=-=-=- function addlilink(tabs, url, name, id, title, key) { //check for duplicates if (document.getElementById(id)){return;} //cologne blue bypass if (document.getElementById('quickbar')) {  if (document.getElementById('quickbar') && document.getElementById('quickbar').getElementsByTagName('h6')[0]) {     addquickbarlink(url, name, id, title, 'Edit'); }  if (document.getElementById('footer') && !document.getElementById('bodyContent')) {     addfooterlink(url, name, id, title); }  return; } //monobook 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; }

function insertAfter(parent, node, referenceNode) { parent.insertBefore(node, referenceNode.nextSibling); }

function prependChild(parent, node) { parent.insertBefore(node, parent.firstChild); }

function addToolboxLink(url, name, id, key) {   if (document.getElementById('p-tb')) {var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];} addlilink(tb, url, name, id, key); }

function addTab(url, name, id, title, key) { //monobook if (document.getElementById('p-cactions')) {var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];} //cologneblue else { if (document.getElementById('quickbar')) {var tabs = document.getElementById('quickbar').getElementsByTagName('h6')[2];} if (document.getElementById('footer')) {var tabs = document.getElementById('footer').getElementsByTagName('td')[0];} return addquickbarlink(url, name, id, 'Edit'); }     return addlilink(tabs, url, name, id, title, key); }

/////////////// //cologneblue tab/link adder function addquickbarlink(url, name, id, title, header) { var header = ' ' + header + ' '; var tabs = document.getElementById('quickbar'); if (tabs.innerHTML.indexOf(header) ==-1) {return;} var add_html = ' ' + name + ' '; var section_html = tabs.innerHTML.split(header)[1].split(' ')[0]; var next_section = ' ' + tabs.innerHTML.split(header)[1].split(' ')[1].split(' ')[0] + ' '; tabs.innerHTML = tabs.innerHTML.split(header)[0] + header + section_html + add_html + next_section + tabs.innerHTML.split(next_section)[1]; }

function addfooterlink(url, name, id, title) { var tabs = document.getElementById('footer').getElementsByTagName('td')[1]; var add_html = ' ' + name + ' '; tabs.innerHTML = add_html + ' | ' + tabs.innerHTML; } ///////////////

function addLink(where, url, name, id, title, key, after){ 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); var tabs = document.getElementById(where).getElementsByTagName('ul')[0]; if(after) { tabs.insertBefore(li,document.getElementById(after)); } else { 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; } /////////////////////////////////////////////

/**** Add generic tab ****/

function addlilink_simple(tabs, url, name, id){ var na = document.createElement('a'); na.href = url; na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); li.id = id; li.appendChild(na); tabs.appendChild(li); return li; }

function addlimenu(tabs, name, id) {   var na = document.createElement('a'); na.href = '#'; var mn = document.createElement('ul'); na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); li.id = id; li.className = 'tabmenu'; li.appendChild(na); li.appendChild(mn); tabs.appendChild(li); return li; }

///////// //These are simplier versions of the above, except they add the links on top, not on botton function addnavbox_link(URL,Name,ID) { //cologne blue bypass if (document.getElementById('quickbar') && document.getElementById('quickbar').getElementsByTagName('h6')[0]) {     var tabs = document.getElementById('quickbar'); addquickbarlink(URL, Name, ID, Name, 'Browse'); return; } //monobook var portlet = document.getElementById('p-navigation'); var links = portlet.getElementsByTagName('ul')[0]; links.innerHTML += '' + Name + ''; } //////////

function URLEncoding(input) {       var encodedInputString=escape(input); encodedInputString=encodedInputString.replace(/\+/g, "%2B"); encodedInputString=encodedInputString.replace(/\//g,"%2F"); encodedInputString=encodedInputString.replace(/&/g,"%26"); var outputurl=encodedInputString; return outputurl; }

if (document.implementation.createDocument) {var gml_xmlparser = new DOMParser;}

function standard_XMLParse(string) { if (document.implementation.createDocument) {   return gml_xmlparser.parseFromString(string, "text/xml"); }  else if (window.ActiveXObject) {   string = string.replace(//, ''); rer = string.match(//)[0].replace(/&/g, '&'); if (rer) {string = string.replace(//, rer);} var gml_xmldoc = new ActiveXObject("Microsoft.XMLDOM"); gml_xmldoc.async = false; ret = gml_xmldoc.loadXML(string); myErr = gml_xmldoc.parseError; if (myErr.errorCode || !ret) {			showError("Error: " + ERROR_XML + myErr.reason); return null; }		return gml_xmldoc.documentElement } return null; }

var xml_http;

function HTTPClient { var xml_http = false; if(window.XMLHttpRequest) xml_http = new XMLHttpRequest; else if (IE){ try{ xml_http = new ActiveXObject("Msxml2.XMLHTTP") } catch (e){ try{ xml_http = new ActiveXObject("Microsoft.XMLHTTP") } catch (e){} } }	if (!xml_http) showError(ERROR_XML); return xml_http };

//==========In Other Languages Translation=============== // Script from User:Tra/sidebartranslate.js /* document.write(''); */

//=============User:Zocky/Picture_Popups================== // User:Zocky/PicturePopups.js document.write(' ');

//=================TW============= importScript('User:AzaToth/twinkle.js'); TwinkleConfig = { userTalkPageMode               :       'tab', showSharedIPNotice             :       false, openTalkPage                   :       [ 'agf', 'norm', 'vand' ], summaryAd                      :       "", deletionSummaryAd              :       "", protectionSummaryAd            :       "", watchSpeedyPages               :       [], watchProdPages                 :       false, openUserTalkPageOnSpeedyDelete :       [], watchRevertedPages             :       [], markRevertedPagesAsMinor       :       [ 'vand', 'torev' ], deleteTalkPageOnDelete         :       false, watchWarnings                  :       false, };

//importScript("User:Gracenotes/amelvand.js"); importScript('User:Voice of All/Sleeper/monobook.js'); importScript('User:ais523/editcount.js'); //User:ais523/editcount.js