User:Cizagna/global.js

//

// ***************************************************************** // Load various external scripts importScriptURI('http://www.wikia.com/index.php?title=User:Splarka/contribtools.js&action=raw&ctype=text/javascript&dontcountme=s'); importScriptURI('http://www.wikia.com/index.php?title=User:Splarka/fastdelete.js&action=raw&ctype=text/javascript&dontcountme=s') /*Disable if(skin == "monobook") importScriptURI('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://images1.wikia.nocookie.net/central/images/2/28/Button_wikilink.png", "speedTip": "Link", "tagOpen": "",    "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/3/3b/Button_template_alt.png", "speedTip": "template", "tagOpen": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/b/b4/Button_category03.png", "speedTip": "Category", "tagOpen": "[[Category:",    "tagClose": "]]", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/c/c8/Button_redirect.png", "speedTip": "Redirect", "tagOpen": "#REDIRECT ",    "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/c/c9/Button_strike.png", "speedTip": "Strike", "tagOpen": " ", "tagClose": " ", "sampleText": "Strike-through text"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/f/f6/Button_html_comment.png", "speedTip": "HTML comment", "tagOpen": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/3/3c/Button_pre.png", "speedTip": "<" + "pre> tag", "tagOpen": "<" + "pre>\n", "tagClose": "\n", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/2/23/Button_code.png", "speedTip": " tag", "tagOpen": "", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/7/7b/Button_pre_nowiki.png", "speedTip": "<" + "pre> tags", "tagOpen": "<" + "pre>\n", "tagClose": "\n", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/7/73/Button_code_nowiki.png", "speedTip": " tags", "tagOpen": "", "tagClose": " ", "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://images1.wikia.nocookie.net/central/images/9/9f/Button_defaultsort.png", "speedTip": "defaultsort", "tagOpen": "", "sampleText": "Insert key here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/3/33/Button_onlyinclude.png", "speedTip": "onlyinclude", "tagOpen": "<" + "onlyinclude" + ">", "tagClose": "", "sampleText": "Insert key here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/d/d1/Button_pipehack.png", "speedTip": "WikiTable hack", "tagOpen": "|", "tagClose": "", "sampleText": ""}; /*** helper stuff *****/ mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/2/29/Button_user.png", "speedTip": "My global User template", "tagOpen": "", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images3.wikia.nocookie.net/central/images/f/fc/Button_user_talk.png", "speedTip": "My global Usertalk template", "tagOpen": "\r\nClick here to see admins of this wiki", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/central/images/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 importScriptURI; var fdButtons = []; fdButtons[fdButtons.length] = { 'summary': 'Spam', 'label': 'S'};

// ***************************************************************** // Subpages if(wgNamespaceNumber!=-1) addOnloadHook(function { addPortletLink('p-cactions','/wiki/Special:Prefixindex/' + escape(wgPageName),'Subpages','ca-subpages','Show subages of ' + wgPageName); });

// ***************************************************************** //  Adds 0 edit link function addZeroEditSectionLink{ if (wgNamespaceNumber == -1 || wgAction != 'view') return; var s = $T.create('span', {'class':'editsection',style:'float:none;position:absolute;'}); var a = $T.create('a', {href: wgScript+'?title='+wgPageName+'&action=edit&section=0', title:'Editar la sección inicial'}, 'editar'); $T.makeChildren([document.createTextNode('['),a,document.createTextNode(']')],s); (document.getElementById('content')||document.getElementById('article')).getElementsByTagName('h1')[0].appendChild(s); }

//