//<pre><nowiki>
// Filter changes live
loadJS(']');
// Show diffs on recent changes, history pages and so on
loadJS(']');
var isIE=((self.navigator.appName).indexOf("Microsoft")!=-1);
if (!isIE) loadJS(']');
//loadJS(']');
loadJS(']');
popupAdminLinks=true; popupShortcutKeys=true; popupFixDabs=true;
popupPreviewKillTemplates=false; popupPreviewFirstParOnly=false;
popupOnlyArticleLinks=false;
popupEditCounterTool='interiot';
popupExtraUserMenu='<line><<monobook|shortcut=M>>|<<editMonobook|edit>></line>';
popupFixRedirs=true;
//popupLiveOptions=true;
// loadJS(']');
loadJS(']');
$(function(){window.popupShortcutKeys=true;}); // for testing
if (location.href == "http://en.wikipedia.orghttps://dictious.com/en/User:Jitse_Niesen/Client-side_preferences") loadJS(']');
/////////////////////////
// messy stuff
/////////////////////////
$(function(){if (/Special(%3|:)(Newpages|Recentchanges)/.test(document.referrer)) document.getElementsByTagName('h1').innerHTML += ' - <a href="http://www.google.com/search?q=' + document.title.split(' - ').split(' ').join('+') + '">FGI</a>';});
function addRefsLinks(btn) {
var pageTitle=document.getElementsByTagName('h1').innerHTML;
var lks=document.links;
var refReq=refsContent(pageTitle);
for (var i=0; i<lks.length; ++i) {
var article=articleFromURL(lks.href);
if(!article) continue;
var talk=null;
if (!userName(article)) continue;
talk=talkPage(article);
if(!talk) continue;
var a=document.createElement('a');
a.href=titlebase + talk +
'&action=edit&autoedit=s#$#\n' + refReq + ' ~~~~#&autoclick=' +
btn +
'&autosummary=References for [['+
pageTitle+
']]';
var tt=document.createTextNode(' . . ');
a.innerHTML='request references';
lks.parentNode.appendChild(tt);
lks.parentNode.appendChild(a);
}
}
function refsContent(pageTitle) {
var refRequests=['\\n\\n{{subst:unref-talk|%s}}',
'\\n\\n==Missing refs==\\n\\nHi! I noticed that ] doesn\'t seem to have any refs, and you\'ve written a fair bit of it. Please could you add some when you get a chance? Thanks!',
'\\n\\n==Refs?==\\n\\nHello, any chance of adding refs to ]? Cheers,',
'\\n\\n==References for ]==\\n\\nHowdy. Do you remember the references you used when you wrote ]? If you could add them in, it\'d improve the article. Thanks in advance,',
'\\n\\n==References needed==\\n\\nHello, I\'d like to verify ] but have no references. Please could you add the sources you used to write the article? Cheers,',
'\\n\\n==References==\\n\\nHello! I noticed that ] doesn\'t have any references or sources. Although the contents of that article do seem like "common knowledge", it would still be helpful if you could mention your sources. Many thanks,',
'\\n\\n==]==\\n\\n...is unsourced. Please fix. Thanks,',
'\\n\\n==References for ]==\\n\\nHi! I realise that it\'s been some time since you edited ], but it would be great if you could remember the references you used and add them to the page. Thanks!'
];
var promptText='Select reference request:';
for (var i=0; i<refRequests.length; ++i) { promptText += '\n\n'+i+': '+ refRequests;}
var response=parseInt(prompt(promptText));
if(!response || isNaN(response) || response >= refRequests.length || response < 0) response=0;
return refRequests.split('%s').join(pageTitle);
}
var refs=addRefsLinks;
//ta = ;
//addOnloadFunction(function(){document.getElementById('searchInput').accessKey='/';});
function removeAccessKeys(keylist) {
var t=document.getElementsByTagName('A'), u=document.getElementsByTagName('input');
for (var i=0; i<t.length+u.length; ++i) {
var s=((i<t.length) ? t : u);
for (var j=0; j<keylist.length; ++j) if (s.accessKey==keylist) s.accessKey='';
}
};
function removeAnnoyingKeys() {removeAccessKeys();}
addOnloadFunction(removeAnnoyingKeys);
function fixWatchlistLink () {
for (var i=0; i<document.links.length; ++i) {
if (document.links.href.indexOf('Special:Watchlist')>0) {
document.links.href+='?hideOwn=1';
break;
}
}
};
if (!isIE)
{
addOnloadFunction(fixWatchlistLink);
}
// summary nag
function perhapsSave(ev)
{
var sum = document.getElementsByName('wpSummary');
var submit = true;
if (sum.length > 0) {
sum = sum;
if (isBadSummary(sum.value)) {
if (!document.getElementById('jn-fillIn')) {
var div = document.createElement('p');
div.appendChild(document.createTextNode('Fill in the summary!'));
div.setAttribute('style', 'color: #f00; font-size: 150%;');
div.id = 'jn-fillIn';
sum.parentNode.insertBefore(div, sum.nextSibling);
}
sum.focus();
submit = false;
}
}
if (submit) {
var btn = document.getElementById('wpSave');
btn.onclick = null;
btn.setAttribute('type', 'submit');
btn.click();
}
}
function isBadSummary(str) {
var sumRe=RegExp('^ *$|^/.*?/ *$');
return (sumRe.test(str));
}
////////////////////////////////////////////////////////////////
// Evaluator
// Source: http://krolik.net/js-eval.shtml
var evaluatorHTML='<FORM ID="Tester" NAME="Tester" onsubmit="return TesterExecute();" >' +
'<TEXTAREA NAME="MyCommand" COLS=60 ROWS=25 WRAP="off"></TEXTAREA>' +
'<TEXTAREA NAME="MyResult" COLS=40 ROWS=25 WRAP="off"></TEXTAREA>' +
'<BR>' +
'<INPUT TYPE=BUTTON value="Show Object" onclick="ObjectDumpClicked();" >' +
'<INPUT TYPE=BUTTON value="Execute" onclick="TesterExecute();">' +
'</FORM>';
function ObjectDump(strObject)
{
var strOutput;
var vTemp;
var vAnotherTemp;
var vElement;
vElement = eval(strObject);
strOutput = "typeof = " + typeof(vElement) + "\n\n";
AppendOutput(strOutput);
for (var x in vElement )
{
vTemp = strObject + "." + x.toString() ;
vAnotherTemp = strObject + "" ;
strOutput = strOutput + vTemp + " = " + eval(vTemp) + "\n";
AppendOutput(vTemp + " = " + eval(vTemp) + "\n");
}
return strOutput ;
}
function AppendOutput(strText)
{
document.Tester.MyResult.value = document.Tester.MyResult.value + strText;
}
function Output(strText)
{
document.Tester.MyResult.value = strText;
}
function ObjectDumpClicked()
{
document.Tester.MyResult.value="";
ObjectDump(document.Tester.MyCommand.value);
return false;
}
function TesterExecute()
{
document.Tester.MyResult.value="";
document.Tester.MyResult.value=eval(document.Tester.MyCommand.value);
return false;
}
function addEvaluator() {
try {
var evalNode=document.createElement('div');
evalNode.id='evalNode';
evalNode.innerHTML=evaluatorHTML;
document.body.appendChild(evalNode);
document.Tester=document.getElementById('Tester');
}
catch(err){};
}
if(!isIE || true) addOnloadFunction(addEvaluator);
//
// end evaluator
////////////////////////////////////////////////////////////////
// testing
// Useful stuff from ]
function addToolboxLink(url, name, id){
var tb = document.getElementById('p-tb').getElementsByTagName('ul');
addlilink(tb, url, name, id);
}
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 = ;
else if(key) ta = ;
else if(title) ta = ;
}
// re-render the title and accesskeys from existing code in wikibits.js
akeytt();
return li;
}
function addTab(url, name, id, title, key){
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul');
addlilink(tabs, url, name, id, title, key);
}
function addPurge(){
ta = ;
var x = document.getElementById('ca-history');
if(!x) return;
if(x.children) x = x.children.href;
else x = x.childNodes.href;
addTab(x.replace(/=history/, "=purge"), 'purge', 'ca-purge');
akeytt();
}
// culled from ]
function nichalp_articleFromURL(h) {
if (typeof h != 'String') h=String(h);
h=decodeURI(h);
var m=RegExp('*://en\\.wikipedia\\.org/(wiki/|w/index\\.php\\?title=)(*)').exec(h);
if(m===null) return null;
return m;
}
function nichalp_isIpUser(user) {
return RegExp('(User:)?' +
'((25|2|1||)\\.){3}' +
'(25|2|1||)')
.test(user);
}
function nichalp_removeAnchor(article) {
// is there a #? if not, we're done
var i=article.indexOf('#');
if (i == -1) return article;
return article.substring(0,i);
}
function nichalp_userName(article) {
var i=article.indexOf('User');
var j=article.indexOf(':');
if (i != 0 || j == -1) return null;
var k=article.indexOf('/');
if (k==-1) return article.substring(j+1);
else return article.substring(j+1,k);
}
// do it
function nichalp_customLinks() {
addPurge();
var article=nichalp_articleFromURL(document.location.href);
if (!article) return;
var user=nichalp_userName(article);
if(!user) return;
user=nichalp_removeAnchor(user);
if (!nichalp_isIpUser(user)) {
addToolboxLink('http://kohl.wikimedia.org/~kate/cgi-bin/count_edits?dbname=enwiki&user='+user, user+"'s edit count", 'toolbox_katestool');
}
var special='http://en.wikipedia.orghttps://en.wiktionary.org/w/index.php?title=Special:';
addToolboxLink(special + 'Log&user='+user, user+"'s log", 'toolbox_userlog');
addToolboxLink(special + 'Blockip&ip='+user, 'Block '+user, 'toolbox_blockuser');
addToolboxLink(special + 'Special:Ipblocklist&action=unblock&ip='+user, 'Unblock '+user, 'toolbox_unblockuser');
}
// make it all happen on page load
if (window.addEventListener) window.addEventListener("load",nichalp_customLinks,false);
else if (window.attachEvent) window.attachEvent("onload",nichalp_customLinks);
else {
window._old_nichalp_onload = window.onload;
window.onload = function() { window._old_nichalp_onload(); nichalp_customLinks(); }
}
function addOnloadFunction (f) {
if (window.addEventListener) window.addEventListener("load",f,false);
else if (window.attachEvent) window.attachEvent("onload",f);
};
window.focusTextBox=function(exclusions) {
var editBox=document.getElementById('wpTextbox1');
if (editBox) { editBox.focus(); return; }
var inputs=document.getElementsByTagName('input');
if(!exclusions) exclusions=;
for (var i=0; i<inputs.length; ++i) {
if(inputs.type=='text' && inputs.name) {
var ignore=false;
for (var j=0; j<exclusions.length; ++j) {
if (inputs.name==exclusions) {ignore=true; break;}
}
if(!ignore) {inputs.focus(); return;}
}
}
}
//addOnloadFunction(function() { if (document.title.indexOf('Preview') == -1) //focusTextBox();});
function loadJS(page){
page=page.replace(/^\\]$/, '$1');
document.write('<script type="text/javascript" src="' +
'http://en.wikipedia.orghttps://en.wiktionary.org/w/index.php?title=' + page +
'&action=raw&ctype=text/javascript&dontcountme=s"></script>');
}
/*
</nowiki></pre>
//<pre><nowiki>
// Filter changes live
loadJS(']');
// Show diffs on recent changes, history pages and so on
loadJS(']');
var isIE=((self.navigator.appName).indexOf("Microsoft")!=-1);
if (!isIE) loadJS(']');
//loadJS(']');
loadJS(']');
popupAdminLinks=true; popupShortcutKeys=true; popupFixDabs=true;
popupPreviewKillTemplates=false; popupPreviewFirstParOnly=false;
popupOnlyArticleLinks=false;
popupEditCounterTool='interiot';
popupExtraUserMenu='<line><<monobook|shortcut=M>>|<<editMonobook|edit>></line>';
popupFixRedirs=true;
//popupLiveOptions=true;
// loadJS(']');
loadJS(']');
$(function(){window.popupShortcutKeys=true;}); // for testing
if (location.href == "http://en.wikipedia.orghttps://dictious.com/en/User:Jitse_Niesen/Client-side_preferences") loadJS(']');
/////////////////////////
// messy stuff
/////////////////////////
$(function(){if (/Special(%3|:)(Newpages|Recentchanges)/.test(document.referrer)) document.getElementsByTagName('h1').innerHTML += ' - <a href="http://www.google.com/search?q=' + document.title.split(' - ').split(' ').join('+') + '">FGI</a>';});
function addRefsLinks(btn) {
var pageTitle=document.getElementsByTagName('h1').innerHTML;
var lks=document.links;
var refReq=refsContent(pageTitle);
for (var i=0; i<lks.length; ++i) {
var article=articleFromURL(lks.href);
if(!article) continue;
var talk=null;
if (!userName(article)) continue;
talk=talkPage(article);
if(!talk) continue;
var a=document.createElement('a');
a.href=titlebase + talk +
'&action=edit&autoedit=s#$#\n' + refReq + ' ~~~~#&autoclick=' +
btn +
'&autosummary=References for [['+
pageTitle+
']]';
var tt=document.createTextNode(' . . ');
a.innerHTML='request references';
lks.parentNode.appendChild(tt);
lks.parentNode.appendChild(a);
}
}
function refsContent(pageTitle) {
var refRequests=['\\n\\n{{subst:unref-talk|%s}}',
'\\n\\n==Missing refs==\\n\\nHi! I noticed that ] doesn\'t seem to have any refs, and you\'ve written a fair bit of it. Please could you add some when you get a chance? Thanks!',
'\\n\\n==Refs?==\\n\\nHello, any chance of adding refs to ]? Cheers,',
'\\n\\n==References for ]==\\n\\nHowdy. Do you remember the references you used when you wrote ]? If you could add them in, it\'d improve the article. Thanks in advance,',
'\\n\\n==References needed==\\n\\nHello, I\'d like to verify ] but have no references. Please could you add the sources you used to write the article? Cheers,',
'\\n\\n==References==\\n\\nHello! I noticed that ] doesn\'t have any references or sources. Although the contents of that article do seem like "common knowledge", it would still be helpful if you could mention your sources. Many thanks,',
'\\n\\n==]==\\n\\n...is unsourced. Please fix. Thanks,',
'\\n\\n==References for ]==\\n\\nHi! I realise that it\'s been some time since you edited ], but it would be great if you could remember the references you used and add them to the page. Thanks!'
];
var promptText='Select reference request:';
for (var i=0; i<refRequests.length; ++i) { promptText += '\n\n'+i+': '+ refRequests;}
var response=parseInt(prompt(promptText));
if(!response || isNaN(response) || response >= refRequests.length || response < 0) response=0;
return refRequests.split('%s').join(pageTitle);
}
var refs=addRefsLinks;
//ta = ;
//addOnloadFunction(function(){document.getElementById('searchInput').accessKey='/';});
function removeAccessKeys(keylist) {
var t=document.getElementsByTagName('A'), u=document.getElementsByTagName('input');
for (var i=0; i<t.length+u.length; ++i) {
var s=((i<t.length) ? t : u);
for (var j=0; j<keylist.length; ++j) if (s.accessKey==keylist) s.accessKey='';
}
};
function removeAnnoyingKeys() {removeAccessKeys();}
addOnloadFunction(removeAnnoyingKeys);
function fixWatchlistLink () {
for (var i=0; i<document.links.length; ++i) {
if (document.links.href.indexOf('Special:Watchlist')>0) {
document.links.href+='?hideOwn=1';
break;
}
}
};
if (!isIE)
{
addOnloadFunction(fixWatchlistLink);
}
// summary nag
function perhapsSave(ev)
{
var sum = document.getElementsByName('wpSummary');
var submit = true;
if (sum.length > 0) {
sum = sum;
if (isBadSummary(sum.value)) {
if (!document.getElementById('jn-fillIn')) {
var div = document.createElement('p');
div.appendChild(document.createTextNode('Fill in the summary!'));
div.setAttribute('style', 'color: #f00; font-size: 150%;');
div.id = 'jn-fillIn';
sum.parentNode.insertBefore(div, sum.nextSibling);
}
sum.focus();
submit = false;
}
}
if (submit) {
var btn = document.getElementById('wpSave');
btn.onclick = null;
btn.setAttribute('type', 'submit');
btn.click();
}
}
function isBadSummary(str) {
var sumRe=RegExp('^ *$|^/.*?/ *$');
return (sumRe.test(str));
}
function modifySaveButton()
{
// action=edit for edit pages, action=submit for previews
var loc=window.location.href;
if ((loc.indexOf('&action=edit') != -1 ||
loc.indexOf('&action=submit') != -1
) && loc.indexOf(':RadioKirk') == -1 ) {
var btn = document.getElementById('wpSave');
btn.setAttribute('type', 'button');
btn.onclick = perhapsSave;
}
}
if(!isIE) addOnloadFunction(modifySaveButton);
////////////////////////////////////////////////////////////////
// Evaluator
// Source: http://krolik.net/js-eval.shtml
var evaluatorHTML='<FORM ID="Tester" NAME="Tester" onsubmit="return TesterExecute();" >' +
'<TEXTAREA NAME="MyCommand" COLS=60 ROWS=25 WRAP="off"></TEXTAREA>' +
'<TEXTAREA NAME="MyResult" COLS=40 ROWS=25 WRAP="off"></TEXTAREA>' +
'<BR>' +
'<INPUT TYPE=BUTTON value="Show Object" onclick="ObjectDumpClicked();" >' +
'<INPUT TYPE=BUTTON value="Execute" onclick="TesterExecute();">' +
'</FORM>';
function ObjectDump(strObject)
{
var strOutput;
var vTemp;
var vAnotherTemp;
var vElement;
vElement = eval(strObject);
strOutput = "typeof = " + typeof(vElement) + "\n\n";
AppendOutput(strOutput);
for (var x in vElement )
{
vTemp = strObject + "." + x.toString() ;
vAnotherTemp = strObject + "" ;
strOutput = strOutput + vTemp + " = " + eval(vTemp) + "\n";
AppendOutput(vTemp + " = " + eval(vTemp) + "\n");
}
return strOutput ;
}
function AppendOutput(strText)
{
document.Tester.MyResult.value = document.Tester.MyResult.value + strText;
}
function Output(strText)
{
document.Tester.MyResult.value = strText;
}
function ObjectDumpClicked()
{
document.Tester.MyResult.value="";
ObjectDump(document.Tester.MyCommand.value);
return false;
}
function TesterExecute()
{
document.Tester.MyResult.value="";
document.Tester.MyResult.value=eval(document.Tester.MyCommand.value);
return false;
}
function addEvaluator() {
try {
var evalNode=document.createElement('div');
evalNode.id='evalNode';
evalNode.innerHTML=evaluatorHTML;
document.body.appendChild(evalNode);
document.Tester=document.getElementById('Tester');
}
catch(err){};
}
if(!isIE || true) addOnloadFunction(addEvaluator);
//
// end evaluator
////////////////////////////////////////////////////////////////
// testing
// Useful stuff from ]
function addToolboxLink(url, name, id){
var tb = document.getElementById('p-tb').getElementsByTagName('ul');
addlilink(tb, url, name, id);
}
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 = ;
else if(key) ta = ;
else if(title) ta = ;
}
// re-render the title and accesskeys from existing code in wikibits.js
akeytt();
return li;
}
function addTab(url, name, id, title, key){
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul');
addlilink(tabs, url, name, id, title, key);
}
function addPurge(){
ta = ;
var x = document.getElementById('ca-history');
if(!x) return;
if(x.children) x = x.children.href;
else x = x.childNodes.href;
addTab(x.replace(/=history/, "=purge"), 'purge', 'ca-purge');
akeytt();
}
// culled from ]
function nichalp_articleFromURL(h) {
if (typeof h != 'String') h=String(h);
h=decodeURI(h);
var m=RegExp('*://en\\.wikipedia\\.org/(wiki/|w/index\\.php\\?title=)(*)').exec(h);
if(m===null) return null;
return m;
}
function nichalp_isIpUser(user) {
return RegExp('(User:)?' +
'((25|2|1||)\\.){3}' +
'(25|2|1||)')
.test(user);
}
function nichalp_removeAnchor(article) {
// is there a #? if not, we're done
var i=article.indexOf('#');
if (i == -1) return article;
return article.substring(0,i);
}
function nichalp_userName(article) {
var i=article.indexOf('User');
var j=article.indexOf(':');
if (i != 0 || j == -1) return null;
var k=article.indexOf('/');
if (k==-1) return article.substring(j+1);
else return article.substring(j+1,k);
}
// do it
function nichalp_customLinks() {
addPurge();
var article=nichalp_articleFromURL(document.location.href);
if (!article) return;
var user=nichalp_userName(article);
if(!user) return;
user=nichalp_removeAnchor(user);
if (!nichalp_isIpUser(user)) {
addToolboxLink('http://kohl.wikimedia.org/~kate/cgi-bin/count_edits?dbname=enwiki&user='+user, user+"'s edit count", 'toolbox_katestool');
}
var special='http://en.wikipedia.orghttps://en.wiktionary.org/w/index.php?title=Special:';
addToolboxLink(special + 'Log&user='+user, user+"'s log", 'toolbox_userlog');
addToolboxLink(special + 'Blockip&ip='+user, 'Block '+user, 'toolbox_blockuser');
addToolboxLink(special + 'Special:Ipblocklist&action=unblock&ip='+user, 'Unblock '+user, 'toolbox_unblockuser');
}
// make it all happen on page load
if (window.addEventListener) window.addEventListener("load",nichalp_customLinks,false);
else if (window.attachEvent) window.attachEvent("onload",nichalp_customLinks);
else {
window._old_nichalp_onload = window.onload;
window.onload = function() { window._old_nichalp_onload(); nichalp_customLinks(); }
}
function addOnloadFunction (f) {
if (window.addEventListener) window.addEventListener("load",f,false);
else if (window.attachEvent) window.attachEvent("onload",f);
};
window.focusTextBox=function(exclusions) {
var editBox=document.getElementById('wpTextbox1');
if (editBox) { editBox.focus(); return; }
var inputs=document.getElementsByTagName('input');
if(!exclusions) exclusions=;
for (var i=0; i<inputs.length; ++i) {
if(inputs.type=='text' && inputs.name) {
var ignore=false;
for (var j=0; j<exclusions.length; ++j) {
if (inputs.name==exclusions) {ignore=true; break;}
}
if(!ignore) {inputs.focus(); return;}
}
}
}
//addOnloadFunction(function() { if (document.title.indexOf('Preview') == -1) //focusTextBox();});
function loadJS(page){
page=page.replace(/^\\]$/, '$1');
document.write('<script type="text/javascript" src="' +
'http://en.wikipedia.orghttps://en.wiktionary.org/w/index.php?title=' + page +
'&action=raw&ctype=text/javascript&dontcountme=s"></script>');
}
/*
</nowiki></pre>
*/