Jump to content

User:Brian0918/monobook.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//<pre>

// La parte di script per l'estensione del box strumenti è opera di [[Utente:Timendum]]
// (un sentito ringraziamento) :-)

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

 var boxclone = document.createElement("div");
 boxclone.id = 'p-navclone';
 boxclone.setAttribute("class","portlet");

 var titolo = document.createElement("h5");
 titolo.innerHTML = "more tools";
 boxclone.appendChild(titolo);

 var corpo = document.createElement("div");
 corpo.setAttribute("class","pBody");
 var list_ul = document.createElement("ul");

 var list_a = document.createElement("li");
 list_a.id = 'v-sandbox';
 var link_a = document.createElement("a");
 link_a.href = '/wiki/User:Brian0918/Sandbox';
 link_a.innerHTML = 'my sandbox';
 list_a.appendChild(link_a);
 list_ul.appendChild(list_a);

 var list_b = document.createElement("li");
 list_b.id = 'v-blockip';
 var link_b = document.createElement("a");
 link_b.href = '/wiki/Special:Blockip';
 link_b.innerHTML = 'block ip';
 list_b.appendChild(link_b);
 list_ul.appendChild(list_b);

 var list_c = document.createElement("li");
 list_c.id = 'v-ipblocklist';
 var link_c = document.createElement("a");
 link_c.href = '/wiki/Special:Ipblocklist';
 link_c.innerHTML = 'ip blocklist';
 list_c.appendChild(link_c);
 list_ul.appendChild(list_c);

 var list_d = document.createElement("li");
 list_d.id = 'v-blocklog';
 var link_d = document.createElement("a");
 link_d.href = '/wiki/Special:Log/Block';
 link_d.innerHTML = 'block log';
 list_d.appendChild(link_d);
 list_ul.appendChild(list_d);


 corpo.appendChild(list_ul);
 boxclone.appendChild(corpo);
 document.getElementById("column-one").appendChild(boxclone);
}

/*
if (window.addEventListener) window.addEventListener("load",morelinks,false);
else if (window.attachEvent) window.attachEvent("onload",morelinks);
*/
addOnloadHook(morelinks);



// This script is at http://en.wikipedia.org/w/index.php?title=User:Markaci/monobook.js&action=raw&ctype=text/javascript&dontcountme=s

/* OLD CUSTOM SIGNATURE METHOD - DOESN'T WORK ANYMORE
/////////////////////////////////
// Signature fix.
function sigFix () {
document.getElementById("toolbar").innerHTML=document.getElementById("toolbar").innerHTML.replace('--~~' + '~~','&amp;mdash; <small><sub>[[User_talk:Brian0918|<font color=&quot;#444444&quot;>09180918091809180918091809180918</font>]]</sub><sup><span style=&quot;position: relative; left:-24px; margin-right:-24px;&quot;>[[User:Brian0918|<b><font color=&quot;#222222&quot;>BRIAN</font></b>]]</span></sup> &amp;bull; {{subst' + ':CURRENTYEAR}}-{{subst' + ':CURRENTMONTH}}-{{subst' + ':CURRENTDAY2}} {{subst' + ':CURRENTTIME}}</small>');
}


function reformatMyPage() {
  sigFix();
}
if (window.addEventListener) window.addEventListener("load",reformatMyPage,false);
else if (window.attachEvent) window.attachEvent("onload",reformatMyPage);
/////////////////////////////////
*/


/* NEW CUSTOM SIGNATURE METHOD */
if (mwCustomEditButtons) {
  mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://en.wikipedia.org/skins-1.5/common/images/button_sig.png",
    "speedTip": "Signature",
    "tagOpen": "&mdash; <small>[[User:Brian0918|<b><font color=black>BRIAN</font></b>]][[User_talk:Brian0918|<font color=gray>0918</font>]] &bull; {{subst:CURRENTYEAR}}-{{subst:CURRENTMONTH}}-{{subst:CURRENTDAY2}} {{subst:CURRENTTIME}}Z</small>",
    "tagClose": "",
    "sampleText": ""};
};


/////////////////////////////////
// [[User:Lupin/popups.js]] - please include this line 

mw.loader.load(
             'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
             + '&action=raw&ctype=text/javascript&dontcountme=s');

// delay in seconds before popup appears
popupDelay=0.4;
// move default titles into popups so they don't interfere
removeTitles=true;
// no downloading to create popup
simplePopups=true;
//popup includes images even when hovering over an image
imagePopupsForImages=true;

popupAdminLinks=true;
/////////////////////////////////


// [[User:Zocky/SearchBox.js]]
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Zocky/SearchBox.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

//</pre>