User:Tom mayfair/uncyclopedia.js

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search

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

  • Internet Explorer: hold down the Ctrl key and click the Refresh or Reload button, or press Ctrl+F5.
  • Firefox: hold down the Shift key while clicking Reload; alternatively press Ctrl+F5 or Ctrl-Shift-R.
  • Opera, Konqueror and Safari users can just click the Reload button.
  • Chrome: press Ctrl+F5 or Shift+F5
// http://en.uncyclopedia.co/w/index.php?title=User:Olipro/uncyclopedia.js&action=raw&ctype=text/javascript&dontcountme=s <pre><nowiki>

// change favicon.ico
// document.write('<link REL="shortcut icon" HREF="http://en.uncyclopedia.co/images/0/0a/Favtater.ico" />')

//[[User:Olipro|Olipro's]] special function to destroy AddOnLoadHook() Functions

function removeOnLoadHook(funct) {
    onloadFuncts = window.onloadFuncts;
    for(i in onloadFuncts) {
        if (onloadFuncts[i].toString().indexOf('function '+funct) == 0) {
            onloadFuncts[i] = function dosodall() { };
        }
    }
}
//End Function

// =================================================================
// onload                                                           
// =================================================================

// functions to run when the document loads
function Main() {
    removeOnLoadHook('disableOldForumEdit');
    removeOnLoadHook('disableEdits');
    committee();
    addactions();
    addtoolbox();
    changetoolbox();
    addnavbox();
    changenavbox();
    addpersonal();
    changepersonal();
    changekeys();
    highlightNewpages();
}
document.write('<script type="text/javascript" src="'
  + 'http://en.uncyclopedia.co/w/index.php?title=User:Olipro/orphandel.js' 
  + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

document.write('<script type="text/javascript" src="'
  + 'http://en.uncyclopedia.co/w/index.php?title=User:Olipro/QVFDAutoDel.js' 
  + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

document.write('<script type="text/javascript" src="'
  + 'http://en.uncyclopedia.co/w/index.php?title=User:Olipro/rollback2.js' 
  + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

document.write('<script type="text/javascript" src="' 
   + 'http://en.uncyclopedia.co/w/index.php?title=User:Villahj_Ideeut/QVFD.js' 
   + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

document.write('<script type="text/javascript" src="'
  + 'http://en.uncyclopedia.co/w/index.php?title=User:Olipro/autodelete.js' 
  + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

document.write('<script type="text/javascript" src="'
  + 'http://en.uncyclopedia.co/w/index.php?title=User:Olipro/tabscontrol.js' 
  + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

document.write('<script type="text/javascript" src="'
  + 'http://en.uncyclopedia.co/w/index.php?title=User:Olipro/recentdelete.js' 
  + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

document.write('<script type="text/javascript" src="'
  + 'http://en.uncyclopedia.co/w/index.php?title=User:Tom_mayfair/autotalk.js' 
  + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

document.write('<script type="text/javascript" src="'
  + 'http://en.uncyclopedia.co/w/index.php?title=User:Olipro/newpagesdel.js' 
  + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

var displayFlashOverride = true;
function committee() {
    if(document.title.indexOf("Editing User talk:") == 0) { 
        var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
        addlilink(tabs, 'javascript:welcome()', 'welcome', 'ca-welcome');
        addlilink(tabs, 'javascript:twat()', 'twat', 'ca-twat');
   }
}

var mybrowser = navigator.userAgent;
if(mybrowser.search(/MSIE/i) != -1)
{
    attachEvent('onload', Main);
} else if(mybrowser.search(/Firefox/i) == -1) {
    document.addEventListener('load', Main, false);
}else {
    document.addEventListener('DOMContentLoaded', Main, false);
}
var delcheck;
function resetDelete()
{
    if(delcheck == 1)
        return 0;
    document.getElementById('ca-delete').getElementsByTagName('a')[0].innerHTML = 'delete';
    //document.getElementById('del-drop').innerHTML = '';
    var ddown = document.getElementById('delete-dropdown');
    var mainer = document.getElementById('ca-delete');
    mainer.removeChild(ddown);
    rendercheck = 0;
    delcheck = 1;
}
var rendercheck;
var deleteUrl;
function autoDelete() {
   if (document.getElementById('ca-delete') != undefined && rendercheck != 1) {
      //rememberer = document.getElementById('ca-delete').innerHTML;
      document.getElementById('ca-delete').getElementsByTagName('a')[0].innerHTML = 'delete ↓';
      deleteUrl = document.getElementById('ca-delete').firstChild + '';
      var deletePosition = document.getElementById('ca-delete').offsetLeft;
      var deleteBox = '<div id="delete-dropdown" style="position: absolute; z-index: 3; left: ' + deletePosition + 'px; top:1.8em;">';
      deleteBox += '<a href="' + deleteUrl + '&setdelconfirm=wpConfirmB">Auto delete</a>';
      deleteBox += '<a href="' + deleteUrl + '&setdelconfirm=wpConfirmB&wpReason=1.2 [[Uncyclopedia:Patented nonsense|Patented nonsense]]">nonsense</a>';
      deleteBox += '<a href="' + deleteUrl + '&setdelconfirm=wpConfirmB&wpReason=1.B Read [[HTBFANJS]].">Crap</a>';
      deleteBox += '<a href="' + deleteUrl + '&setdelconfirm=wpConfirmB&wpReason=1.5 [[Uncyclopedia:Vanity Policies|We don\'t care]]. Go away.">Vanity</a>';
      deleteBox += '<a href="' + deleteUrl + '&setdelconfirm=wpConfirmB&wpReason=1.5.1 [[UN:CM|Codeine\'s Mum]] hasn\'t heard of you. Go away.">Codeine\'s Mum</a>';
      deleteBox += '<a href="' + deleteUrl + '&setdelconfirm=wpConfirmB&wpReason=2.3 [[Uncyclopedia:Intensive Care Unit|ICU expired]]">ICU expired</a>';
      deleteBox += '<a href="' + deleteUrl + '&setdelconfirm=wpConfirmB&wpReason=2.4 Abandoned WIP">WIP Abandon</a>';
      deleteBox += '<a href="' + deleteUrl + '&setdelconfirm=wpConfirmB&wpReason=[[vfd|Voted for deletion]]">vfd</a>';
      if (document.cookie.indexOf('lastDelReason') != -1 ) {
         var cStart = document.cookie.indexOf('lastDelReason') + 14;
         var cEnd = document.cookie.indexOf(';', cStart);
         if (cEnd == -1) cEnd = document.cookie.length;
         lastReason = unescape(document.cookie.substring(cStart, cEnd));
         deleteBox += '<a href="' + deleteUrl + '&setdelconfirm=wpConfirmB&wpReason=' + escape(lastReason) + '">last: <i>' + lastReason.substr(0,10) + '...</i></a>';
      }
      deleteBox += '<a href="javascript:customreason();" id="customres">custom...</a>';
      deleteBox += '</span>';
      document.getElementById('ca-delete').innerHTML += deleteBox;
      document.getElementById('content').addEventListener('mouseover', resetDelete, false);
      document.getElementById('customres').addEventListener('mousedown', customreason, false);
      rendercheck = 1;
      delcheck = 0;
   }
}
 function addRecentDelete() {
     if(wgPageName != 'Special:Recentchanges')
         return;
     lilinks = document.getElementsByTagName('ul')[0].getElementsByTagName('li');
     for(i = 0; i < lilinks.length; i++) {
         if(lilinks[i].getElementsByTagName('a')[0].innerHTML != 'hist')
             continue;
         replace = lilinks[i].innerHTML.substring(6, lilinks[i].innerHTML.length);
         thtitle = lilinks[i].getElementsByTagName('a')[1].getAttribute('href');
         thtitle = thtitle.substring(6, thtitle.length);
         lilinks[i].innerHTML = '(<a href="/index.php?title=' + thtitle + '&action=delete&setdelconfirm=true">huff</a>)' + replace;
     }
 }
function customreason() {
    var delReason=prompt('Enter deletion reason');
    if (delReason != null) {
        document.cookie= 'lastDelReason=' + escape(delReason) + '; path=/';
        window.location='' + deleteUrl + '&setdelconfirm=wpConfirmB&wpReason=' + escape(delReason);
    }
}
function setDeleteForm() {
    if(window.location.href.indexOf('deltalkpage') != -1)
    {
        var dbody = document.getElementById('bodyContent');
        var alink = dbody.getElementsByTagName('a');
        for(i in alink) {
            if(alink[i].innerHTML == 'del') {
                window.location.href = alink[i].getAttribute('href').toString() + '&setdelconfirm=wpConfirmB';
                break;
            }
        }
    }
    var deleteconfirm = document.getElementById("deleteconfirm");
    if (!deleteconfirm) return;
    
    var summaryText = queryString('setsummary');
    if (summaryText) {
        var summary = document.getElementsByName("wpSummary")[0];
        if (summary) summary.value = summaryText;
    }

    var setDelConfirm = queryString('setdelconfirm');
    if (setDelConfirm) {
        var btn = document.getElementsByName(setDelConfirm)[0];
        if (deleteconfirm && btn) {
            var tlk = document.getElementById('bodyContent').getElementsByTagName('b')[0];
            if(tlk.innerHTML.indexOf('exists for this page')!= -1 && wgPageName != 'This_page_does_not_exist') {
                var curatr = document.getElementById('deleteconfirm').getAttribute('action').toString();
                curatr += '&deltalkpage=true';
                document.getElementById('deleteconfirm').setAttribute('action', curatr);
            }
            btn.textContent += " (auto clicking...)";
            btn.click();
        }
    }
};
// ================================================================= 
// functions called from onload                                      
// ================================================================= 

// useful changable: 'p-personal' 'p-logo' 'p-nav' 'p-search' 'p-tbx' 'p-lang' 'p-cactions'

// functions to pick and order additional action links

function addactions() {
    if(!document.getElementById) return;
    addsearchbuttons();
    addpurge();
    addeditbuttons();
    addusertools();
}

// adds a google and en.wp search link for the title of 'normal' pages

function addsearchbuttons() {
    var x = document.getElementById('ca-history');
    var y = document.getElementById('ca-edit');
    if((!x)&&(!y)) return;
    var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
    var ptitle = document.getElementsByTagName('h1')[0].firstChild.nodeValue;
    if(ptitle.indexOf("Editing")==0) ptitle = ptitle.substring(8)
    addlilink(tabs, "http://www.google.com/search?q=%22"+ ptitle +"%22", 'google', 'ca-google');
    addlilink(tabs, "http://en.wikipedia.org/wiki/Special:Search?search="+ ptitle +"&go=Go", 'en.wp', 'ca-enwp');
}

// purge button, borrowed code

function addpurge() {
    var x = document.getElementById('ca-history');
    var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
    if(!x) return;
    if(x.children) x = x.children[0];
    else x = x.childNodes[0];
    addlilink(tabs, x.href.replace(/=history/, "=purge"), 'purge', 'ca-purge');
}

// javascript buttons for edit pages (the javascript is a template append macro)

function addeditbuttons() {
    var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
    if(document.title.indexOf("Editing") == 0) { 
        addlilink(tabs, 'javascript:redir()', 'redirect', 'ca-redir');
        addlilink(tabs, 'javascript:mtu()', 'MTU', 'ca-mtu');
        addlilink(tabs, 'javascript:nrv()', 'ICU', 'ca-icu');
    }
}

// add user tools buttons to the Special:Contribs pages: block, block log, logs

function addusertools() {
    if(!document.title.indexOf("User contributions") == 0) return;
    var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
    if(document.location.href.indexOf("\/Special:Contributions\/") == -1) { 
        addlilink(tabs, "\/index.php?title=Special:Blockip&ip=" + document.location.href.substring(document.location.href.indexOf("target=")+7), 'ban user', 'ca-blockuser'); 
        addlilink(tabs, "\/index.php?title=Special%3ALog&type=&page=&user=" + document.location.href.substring(document.location.href.indexOf("target=")+7), 'user logs', 'ca-userlogs'); 
        addlilink(tabs, "\/index.php?title=Special%3ALog&type=&user=&page=User:" + document.location.href.substring(document.location.href.indexOf("target=")+7), 'status', 'ca-userstatus'); 
    }
    else { 
        addlilink(tabs, "\/index.php?title=Special:Blockip&ip=" + document.location.href.substring(document.location.href.indexOf("Special:Contributions\/")+22), 'ban user', 'ca-blockuser'); 
        addlilink(tabs, "\/index.php?title=Special%3ALog&type=&page=&user=" + document.location.href.substring(document.location.href.indexOf("Special:Contributions\/")+22), 'user logs', 'ca-userlogs'); 
        addlilink(tabs, "\/index.php?title=Special%3ALog&type=&user=&page=User:" + document.location.href.substring(document.location.href.indexOf("Special:Contributions\/")+22), 'status', 'ca-userstatus'); 
    }
}

// change the name and function of action buttons

function changeactions() {
    if(document.title.indexOf("Confirm delete") == 0) {
        document.getElementById('ca-delete').firstChild.innerHTML = 'delete alt+d';
        //document.getElementById('ca-delete').childNodes[0].href = 'javascript:deletemacro()';
    }
}

// add to the toolbox

function addtoolbox() {
    var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];
    addlilink(tb, '/index.php?title=Special:Log&page=' + getPname(), 'Page logs', 't-pagelogs');
    addlilink(tb, '/wiki/User:Splaka/links', 'Admin Tools', 't-admin');
    addlilink(tb, '/wiki/User:Olipro/Suspect_List', 'Suspect List', 't-parole');
    addlilink(tb, '/wiki/Special:Ipblocklist', 'Block List', 't-blocks');
    addlilink(tb, '/wiki/Special:Prefixindex', 'Prefix Index', 't-prefix');
    var ta = document.getElementById('p-navigation').getElementsByTagName('ul')[0];
    addlilink(ta, '/wiki/Special:Newpages', 'New Pages', 'n-help');
}

// change the name and function of toolbox links

function changetoolbox() {
//    document.getElementById('t-upload').firstChild.innerHTML = 'google';
//    document.getElementById('t-upload').childNodes[0].href = 'http://www.google.com';
}

// add to the navigation box

function addnavbox() {
//    var tb = document.getElementById('p-nav').getElementsByTagName('ul')[0];
//    addlilink(tb, 'http://www.google.com/', 'google', 'p-google');
}

// change the name and function of navigation box links

function changenavbox() {
//    document.getElementById('n-help').firstChild.innerHTML = 'google images';
//    document.getElementById('n-help').childNodes[0].href = 'http://images.google.com';
}

// add to the personal links

function addpersonal() {
//    var tb = document.getElementById('p-personal').getElementsByTagName('ul')[0];
//    addlilink(tb, 'http://www.google.com/', 'google', 't-personalgoogle');
}

// change the name and function of personal links

function changepersonal() {
    if(!document.getElementById) return;
    document.getElementById('pt-preferences').firstChild.innerHTML = 'preferences';
    document.getElementById('pt-watchlist').firstChild.innerHTML = 'watchlist';
    document.getElementById('pt-mycontris').firstChild.innerHTML = 'contributions';
//    document.getElementById('pt-logout').childNodes[0].href = 'http://www.google.com';
//    document.getElementById('pt-logout').firstChild.innerHTML = 'google';
}

// change various shortcut keys
// used by mw: a_cdef_hijklmnopqrstuvwxyz,.+=
// used here: `1-bgÜ;
// free: 234567890[]'/ 

function changekeys() {
    ta['ca-enwp'] = ['`', 'Check en.wikipedia for this topic'];
    ta['ca-google'] = ['1', 'Google search this topic'];
    ta['ca-undic'] = ['u', 'Edit into Undictionary'];
    ta['ca-mtu'] = ['u', 'Tag with MTU'];
    ta['ca-icu'] = ['n', 'Tag with ICU'];
    ta['ca-redir'] = ['r', 'Turn page into a redirect'];
    ta['ca-purge'] = ['', 'Purge the internal cache for this page'];
    ta['ca-blockuser'] = ['b', 'Block user'];
    ta['ca-userlogs'] = ['u', 'All Special:Logs which the user has performed'];
    ta['ca-userstatus'] = ['s', 'All Special:Logs which the user was the target'];
    ta['pt-logout'] = ['Ü', 'Log out'];
    ta['pt-preferences'] = ['g', 'Preferences'];
    ta['pt-mytalk'] = ['','My talk page'];
    ta['pt-anontalk'] = ['','Discussion about edits from this ip address'];
    ta['t-contributions'] = ['a', 'User contributions'];
    ta['t-admin'] = ['', 'My admin tools'];
    ta['t-parole'] = ['', 'My list of users to watch'];
    ta['t-blocks'] = ['', 'All blocks'];
    ta['t-prefix'] = ['-', 'Search by prefix'];
    ta['t-pagelogs'] = [';', 'Show actions performed on this page/image/user'];
    ta['listfrom'] = ['r', 'Show the changes since you loaded this page'];
    akeytt();
}

//More VI goodness!
document.write('<script type="text/javascript" src="'
  + 'http://en.uncyclopedia.co/w/index.php?title=User:Villahj_Ideeut/RC.js' 
  + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//End of RC bit

// =================================================================
// functions called from document                                   
// =================================================================

function mtu() {
    document.editform.wpSummary.value = '+MTU tagging (please move/expand/delete)';
    document.editform.wpMinoredit.checked = true;
    document.editform.wpWatchthis.checked = false;
    var txt = document.editform.wpTextbox1;
    if(txt.value.length > 0) txt.value += '\n';
    txt.value += '{{MTUsign|~~~~~}}';
    document.editform.wpSave.focus();
}

function nrv() {
    document.editform.wpSummary.value = '+ICU tagging (7 day stay of execution)';
    document.editform.wpMinoredit.checked = true;
    document.editform.wpWatchthis.checked = false;
    var txt = document.editform.wpTextbox1;
    if(txt.value.length > 0) txt.value += '\n';
    txt.value += '{{ICU|~~~~~}}';
    document.editform.wpSave.focus();
    document.editform.submit();
}
function welcome() {
    document.editform.wpSummary.value = 'Welcome to Uncyclopedia';
    document.editform.wpMinoredit.checked = false;
    document.editform.wpWatchthis.checked = false;
    var txt = document.editform.wpTextbox1;
    if(txt.value.length > 0) txt.value += '\n';
    txt.value += '{{Subst:User:Tom mayfair/Temp:Welcome}}<br />{{Template:MOOU}}';
    document.editform.wpSave.focus();
    document.editform.submit();
}
function twat() {
    document.editform.wpSummary.value = 'Welcome to Uncyclopedia';
    document.editform.wpMinoredit.checked = false;
    document.editform.wpWatchthis.checked = false;
    var txt = document.editform.wpTextbox1;
    if(txt.value.length > 0) txt.value += '\n';
    txt.value += '{{subst:Oh Dear}} -- ~~~~';
    document.editform.wpSave.focus();
    document.editform.submit();
}
function unrv() {
//dumped
}

function redir() {
    var pagetitle = document.getElementsByTagName('h1')[0].firstChild.nodeValue;
    pagetitle = pagetitle.substring(pagetitle.indexOf("Editing ")+8);
    document.editform.wpSummary.value = 'making redirect';
    document.editform.wpMinoredit.checked = true;
    document.editform.wpWatchthis.checked = false;
    var txt = document.editform.wpTextbox1;
    if(txt.value.length > 0) txt.value += '\n';
    txt.value = '#REDIRECT:[[' + pagetitle + ']]';
    // comment out the following two lines if not using mozilla (too lazy to make it work in IE)
    txt.selectionStart=12;   
    txt.selectionEnd=pagetitle.length+12;
    document.editform.wpTextbox1.focus();
}

function deletemacro () {
    if (document.forms[0].wpReason.value=="") {
        document.forms[0].wpReason.value="deleting";
    }
    document.forms[0].wpConfirmB.click();
}

function searchtool() {
    input_box=confirm("Warning: You will lose any unsaved data");
    if (input_box==true) document.location.href = document.location.href + "&searchbox=1";
}
function makegreen()
{
    this.className = 'new-green';
}
function highlightNewpages () {
   if (window.location.href.indexOf("Special:Newpages") != -1) { 
      var targetContent = document.getElementById('bodyContent');
      var links = targetContent.getElementsByTagName ("li");
      for (var l = 0; l < links.length; l++) {
         liContent = links[l].textContent;
         links[l].addEventListener('click', makegreen, false);
         sizeText = liContent.substring(liContent.indexOf('[')+1,liContent.indexOf('bytes]'));
         sizeBytes = sizeText.replace(',', '');
         if (sizeBytes < 1000) {
            links[l].className = 'new-short';
         }
         if (sizeBytes < 400) {
            links[l].className = 'new-shortest';
         }
      }
   }
}
// =================================================================
// functions needed that I didn't write and don't fully understand
// =================================================================

// query string parsing function (volte)

function queryString(p) {
	var re = RegExp('[&?]' + p + '=([^&]*)');
  
	var matches;
  
	if (matches = re.exec(document.location)) {
		try { 
			return decodeURI(matches[1]);
		} catch (e) {
		}
	}
  
	return null;
};


// function to add buttons/tabs/links (en.wp)

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

function getPname(){
  z=document.getElementById("content").childNodes;
  for (var n=0;n<z.length;n++) { 
    if (z[n].className=="firstHeading") return z[n].textContent;
  };
}

// =================================================================
// really sneeky functions to change the edit buttons               
// =================================================================

// this ignores all addButton() calls except the first, and runs its own

function addButton(imageFile, speedTip, tagOpen, tagClose, sampleText) {
    if(!(speedTip=="Bold text")) return;
    addButtonReally('/skins/common/images/button_bold.png','Bold text','\'\'\'','\'\'\'','Bold text');
    addButtonReally('/skins/common/images/button_italic.png','Italic text','\'\'','\'\'','Italic text');
    addButtonReally('/skins/common/images/button_link.png','Internal link','[[',']]','Link title');
    addButtonReally('/skins/common/images/button_extlink.png','External link (remember http://     prefix)','[',']','http://www.example.com link title');
    addButtonReally('/skins/common/images/button_headline.png','Level 2 headline','\n== ',' ==\n','Headline text');
    addButtonReally('/skins/common/images/button_image.png','Embedded image','[[Image:',']]','Example.jpg');
    addButtonReally('/skins/common/images/button_media.png','Media file link','[[Media:',']]','Example.mp3');
    addButtonReally('/skins/common/images/button_math.png','Mathematical formula (LaTeX)','\<math\>','\</math\>','');
    addButtonReally('/skins/common/images/button_nowiki.png','Ignore wiki formatting','\<nowiki\>','\</nowiki\>','');
    addButtonReally('/skins/common/images/button_sig.png','Your signature with timestamp','~~~~','','');
    addButtonReally('/skins/common/images/button_hr.png','Horizontal line (use sparingly)','\n----\n','','');
}

// this is the sub-called function that the other addButton() calls

function addButtonReally(imageFile, speedTip, tagOpen, tagClose, sampleText) {
    speedTip=escapeQuotes(speedTip);
    tagOpen=escapeQuotes(tagOpen);
    tagClose=escapeQuotes(tagClose);
    sampleText=escapeQuotes(sampleText);
    var mouseOver="";

    if(!document.selection && !is_gecko) {
        // filter backslashes so it can be shown in the infobox
        var re=new RegExp("\\\\n","g");
        tagOpen=tagOpen.replace(re,"");
        tagClose=tagClose.replace(re,"");
        mouseOver = "onmouseover=\"if(!noOverwrite){document.infoform.infobox.value='"+tagOpen+sampleText+tagClose+"'};\"";
    }

        document.write("<a href=\"javascript:insertTags");
        document.write("('"+tagOpen+"','"+tagClose+"','"+sampleText+"');\">");

        document.write("<img width=\"23\" height=\"22\" src=\""+imageFile+"\" border=\"0\" alt=\""+speedTip+"\" title=\""+speedTip+"\""+mouseOver+" />");
        document.write("</a>");
        return;
}

function wikiabug() { }

// =================================================================
// external, addon, or offsite scripts
// =================================================================

//if(queryString("searchbox")) document.write('<script type="text/javascript" src="/index.php?title=User:Splaka/SearchBox.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');

//if(document.title.indexOf("Block user") == 0) document.write('<script type="text/javascript" src="/index.php?title=User:Splaka/popupmenu.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');

// </nowiki></pre>