User:Stevage/monobook.js

/* document.write('<\/script>'); document.write('<\/link>'); //Interiot's javascript edit counter

if (document.title.indexOf('User:Interiot/Tool2/code.js') != -1) { mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Interiot/Tool2/code.js&action=raw&ctype=text/javascript'); document.write('**'+document.title+'**');

}

wpUserName  = 'Stevage';   // User name to display in signatures wpShowImages = true;     // Enable downloading and displaying of images

// 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');

// ================================================== // Fetch and Show talk page in bodyContent (test) // ================================================== var getReq; if(mw.config.get('wgNamespaceNumber')==0) addOnloadHook(getTalkPage) function getTalkPage { var tlink = document.getElementById('ca-talk'); if(tlink.className == 'new') return; var url = tlink.getElementsByTagName('a')[0].href; url += (url.indexOf('?')==-1) ? '?action=render' : '&action=render' ; var tp = document.createElement('div'); tp.style.border = '1px solid blue'; tp.style.margin = '.5em 0'; tp.style.padding = '.35em'; tp.style.height = '20em'; tp.style.overflow = 'auto'; tp.id = 'ajax-talkpage'; tp.appendChild(document.createTextNode('fetching talk page...')); document.getElementById('bodyContent').appendChild(tp); getXML(url,getTalkPageStateChange); } function getTalkPageStateChange { switch (getReq.readyState) { case 4: if (getReq.status == 200) { // OK response var tp = document.getElementById('ajax-talkpage'); clearNode(tp); var txt = getReq.responseText; tp.innerHTML = txt; } else { tp.appendChild(document.createTextNode('** Problem ** ' + getReq.statusText)) }     break; } } function clearNode(obj) { while(obj.firstChild) obj.removeChild(obj.firstChild); } function getText(obj) { if (obj.nodeType == 3) return obj.nodeValue; var txt = new Array; var i=0; while(obj.childNodes[i]) { txt[txt.length] = getText(obj.childNodes[i]); i++; } return txt.join(''); } function getXML(url,func) { if (window.XMLHttpRequest) { // Non-IE browsers getReq = new XMLHttpRequest; } else if (window.ActiveXObject) { // IE   getReq = new ActiveXObject('Microsoft.XMLHTTP'); } if (getReq) { getReq.onreadystatechange = func; try { getReq.open('GET', url, true); getReq.send(''); } catch (e) { alert(e); } } else { alert('XMLHTTPRequest not supported'); } }

importScript("User:EpochFail/No_Biting.js")