User:Cizagna/global.js

//

// ***************************************************************** // Load various external scripts // ***************************************************************** function appendScript(url) { var scriptElem = document.createElement('script'); scriptElem.setAttribute('src',url); scriptElem.setAttribute('type','text/javascript'); document.getElementsByTagName('head')[0].appendChild(scriptElem); } appendScript('http://www.wikia.com/index.php?title=User:Splarka/contribtools.js&action=raw&ctype=text/javascript&dontcountme=s'); appendScript('http://www.wikia.com/index.php?title=User:Splarka/fastdelete.js&action=raw&ctype=text/javascript&dontcountme=s') if(skin == "monobook") appendScript('http://en.wikipedia.org/w/index.php?title=User:Zocky/SearchBox.js&action=raw&ctype=text/javascript&dontcountme=s')

// ***************************************************************** // &bot=1 on contribs pages. // ***************************************************************** function hiderollback { var botlink = document.location.href; if(botlink.indexOf('?')==-1) { botlink += '?bot=1'; } else { botlink += '&bot=1'; } addPortletLink('p-cactions', botlink, '&bot=1', 'ca-bot'); } if((skin == "monobook")&&(wgCanonicalSpecialPageName == 'Contributions')) addOnloadHook(hiderollback)

// ***************************************************************** // Custom edit buttons // ***************************************************************** if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/3/3c/Button_pre.png", "speedTip": " tag", "tagOpen": " \n", "tagClose": "\n ", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/2/23/Button_code.png", "speedTip": " ", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/7/7b/Button_pre_nowiki.png", "speedTip": " tags", "tagOpen": " \n", "tagClose": "\n ", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/7/73/Button_code_nowiki.png", "speedTip": " ", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/c/ce/Button_ampersand_lt-gt_semicolon.png", "speedTip": "&lt;tag here&gt;", "tagOpen": "&lt;", "tagClose": "&gt;", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/d/d1/Button_mysignature.png", "speedTip": "Custom signature with timestamp", "tagOpen": /* */ "--" /* */, "tagClose": "", "sampleText": ""}; }

// ***************************************************************** // Duplicate #p-cactions at bottom // *****************************************************************

//function morelinks { // var tabs = document.getElementById('p-cactions').cloneNode(true); // tabs.id = 'mytabs'; // var listitems = tabs.getElementsByTagName('LI'); // for (i=0;i<listitems.length;i++) { //   if(listitems[i].id) listitems[i].id = 'mytabs-' + listitems[i].id; // } //  document.getElementById('column-content').appendChild(tabs); //} //if(skin == "monobook") addOnloadHook(morelinks)

// ***************************************************************** // Custom automatic delete buttons // ***************************************************************** // Adds customizable one-click deletion buttons to any deletable page. // Requires w:User:Splarka/fastdelete.js in appendScript;

var fdButtons = []; fdButtons[fdButtons.length] = { 'summary': 'Spam', 'label': 'Spam!'};

//