User:Belb/monobook.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
 document.write('<script type="text/javascript" src="/w/index.php?title=MediaWiki:Quick-delete.js&action=raw&ctype=text/javascript"><\/script>');
 //[[MediaWiki talk:Quick-delete.js]]
 
// [[:en:User:Lupin/popups.js]]      
 
mw.loader.load(
             'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
             + '&action=raw&ctype=text/javascript&dontcountme=s');
popupAdminLinks='true';
popupFixRedirs='true';
 
 
//Botões
//var div=document.getElementById('editpage-specialchars');
//if ( div ) {
//  
//}
 
 window.AddMyOwnButton=function(tbar, caption, href, imgsrc) {
   var ba = document.createElement('a');
   ba.href = href;
   var img = document.createElement('img');
   img.src = imgsrc;
   img.alt = caption;
   ba.appendChild(img);
   tbar.appendChild(ba);
 }
 
window.myOwnEditButtons=function() {
  var tbdiv=document.getElementById('toolbar');
  if ( tbdiv ) {
    tbdiv.appendChild(document.createTextNode(' '));
 
// Botao:{Category}
AddMyOwnButton(tbdiv, 'category', 'javascript:document.editform.wpSummary.value=\'\+category\';insertTags(\'[\[Category:\',\']]\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/b/b4/Button_category03.png');
 
// Botao:Agência Brasil
    AddMyOwnButton(tbdiv, 'ABr', 'javascript:document.editform.wpSummary.value=\'+image from Agência Brasil\';insertTags(\'\{\{Information\\n\|Description={{pt|}}\\n\|Source=Agência Brasil []\\n\|Date=//2007\\n\|Author=\\n\|Permission={{Agência Brasil}}\\n\|other_versions=\\n\}\}\\n\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/d/de/Button_%28B%29.png');
 
// Botao:Imagem própria
    AddMyOwnButton(tbdiv, 'Own', 'javascript:document.editform.wpSummary.value=\'+infobox\';insertTags(\'\{\{Information\\n\|Description={{pt|}}\\n\|Source=Picture taken by the uploader\\n\|Date=//2007\\n\|Author=[[User:Dantadd]]\\n\|Permission={{self|cc-by-sa-2.5}}\\n\|other_versions=\\n\}\}\\n\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/6/67/Button_BY.png');

// Botao:Imagen de Presidencia Arg.
    AddMyOwnButton(tbdiv, 'PreArg', 'javascript:document.editform.wpSummary.value=\'+infobox\';insertTags(\'\{\{Information\\n\|Description={{es|}}\\n\|Source=Presidencia de la Nación Arg.\\n\|Date=//2008\\n\|Author=Presidencia de la Nación\\n\|Permission={{cc-ar-presidency}}\\n\|other_versions=\\n\}\}\\n\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/0/0e/Button_acute_accent.png');

    // Botao:Oculto
    AddMyOwnButton(tbdiv, 'OC', 'javascript:document.editform.wpSummary.value=document.editform.wpSummary.value+\'+script oculto \';insertTags(\'<!-- -->\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/3/37/Btn_toolbar_commentaire.png');
 
 
// Botao:&mdash;
    AddMyOwnButton(tbdiv, 'MD', 'javascript:document.editform.wpSummary.value=document.editform.wpSummary.value+\'+&mdash; \';insertTags(\'—\',\'\',\'\');', 'http://pt.wikipedia.org/skins-1.5/common/images/button_hr.png');
 
 
 
// Botao:{Bem vindo}
    caption = 'bv';
    var babv  = document.createElement('a');
    babv.href = 'javascript:document.editform.wpSummary.value=\'\{\{bem vindo\}\}\';insertTags(\'\{\{subst:welcome/pt}} \~\~\~\~\',\'\',\'\');document.editform.submit();';
    var imgbv = document.createElement('img');
    imgbv.src = 'http://upload.wikimedia.org/wikipedia/commons/3/30/Bv_icon.png';
    imgbv.alt = caption;
    babv.appendChild(imgbv);
    tbdiv.appendChild(babv);
 
// Botao:{Bem vindo ip}
    caption = 'bv IP';
    var babv  = document.createElement('a');
    babv.href = 'javascript:document.editform.wpSummary.value=\'\{\{bem vindo ip\}\}\';insertTags(\'\{\{subst:welcome}} \~\~\~\~\',\'\',\'\');document.editform.submit();';
    var imgbv = document.createElement('img');
    imgbv.src = 'http://republico.estv.ipv.pt/~nmct/wikipedia/icons/button_bvip.png';
    imgbv.alt = caption;
    babv.appendChild(imgbv);
    tbdiv.appendChild(babv);
 
// Botao:<strike>
    caption = '<s></s>';
    var bas  = document.createElement('a');
    bas.href = 'javascript:insertTags(\'<s>\',\'</s>\',\'\');';
    var imgs = document.createElement('img');
    imgs.src = 'http://republico.estv.ipv.pt/~nmct/wikipedia/icons/button_strike.png';
    imgs.alt = caption;
    bas.appendChild(imgs);
    tbdiv.appendChild(bas);
 
// Botao:{{ }}
    var caption = 'txt2predef';
    var ba  = document.createElement('a');
    ba.href = 'javascript:insertTags(\'{{\',\'}}\',\'\');';
    var img = document.createElement('img');
    img.src = 'http://republico.estv.ipv.pt/~nmct/wikipedia/icons/button_topredef.png';
    img.alt = caption;
    ba.appendChild(img);
    tbdiv.appendChild(ba);
 
// Botao:<tt>
    caption = '<tt></tt>';
    var batt  = document.createElement('a');
    batt.href = 'javascript:insertTags(\'<tt>\',\'</tt>\',\'\');';
    var imgtt = document.createElement('img');
    imgtt.src = 'http://republico.estv.ipv.pt/~nmct/wikipedia/icons/button_tt.png';
    imgtt.alt = caption;
    batt.appendChild(imgtt);
    tbdiv.appendChild(batt);
 
// Botao:<small>
    caption = '<small></small>';
    var basm  = document.createElement('a');
    basm.href = 'javascript:insertTags(\'<small>\',\'</small>\',\'\');';
    var imgsm = document.createElement('img');
    imgsm.src = 'http://republico.estv.ipv.pt/~nmct/wikipedia/icons/button_small.png';
    imgsm.alt = caption;
    basm.appendChild(imgsm);
    tbdiv.appendChild(basm);
 
  }
}
 
window.myAddOnload=function(f) {
  if (window.addEventListener) window.addEventListener("load", f, false);
  else if (window.attachEvent) window.attachEvent("onload",f);
}
myAddOnload(myOwnEditButtons);
 
mw.loader.load('https://commons.wikimedia.org/w/index.php?title=MediaWiki:UserMessages.js' 
             + '&action=raw&ctype=text/javascript');
//[[MediaWiki talk:UserMessages.js]]
 
mw.loader.load('https://commons.wikimedia.org/w/index.php?title=MediaWiki:HotCat.js' 
             + '&action=raw&ctype=text/javascript');
//[[MediaWiki talk:HotCat.js]]