Usuário:RodrigoTavares/monobook.js

Origem: Wikipédia, a enciclopédia livre.

Nota: Depois de publicar, poderá ter de contornar a cache do seu navegador para ver as alterações.

  • Firefox / Safari: Pressione Shift enquanto clica Recarregar, ou pressione Ctrl-F5 ou Ctrl-R (⌘-R no Mac)
  • Google Chrome: Pressione Ctrl-Shift-R (⌘-Shift-R no Mac)
  • Internet Explorer / Edge: Pressione Ctrl enquanto clica Recarregar, ou pressione Ctrl-F5
  • Opera: Pressione Ctrl-F5.
 /*************************************************************
  *                                                           *
  *        Iniciam-se   aqui  os   Botões  adicionais         *
  *                                                           *
  *************************************************************/

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:{{ }} ¦
 //--------------
    AddMyOwnButton(tbdiv, 'Predefinição', 'javascript:insertTags(\'{\{\',\'}\}\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/9/97/Template_button.png');


 //-------------
 //  Botao:<tt> ¦
 //-------------
    AddMyOwnButton(tbdiv, 'Fonte de largura fixa\(\<tt\>\)', 'javascript:insertTags(\'<tt>\',\'</tt>\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/3/30/Tt_icon.png');

 //--------------------
 //  Botao:{Bem vindo} ¦
 //--------------------
    AddMyOwnButton(tbdiv, 'Bem vindo', 'javascript:document.editform.wpSummary.value=\'\{\{bem vindo\}\}\';insertTags(\'\{\{bem vindo}} \~\~\~\~\',\'\',\'\');document.editform.submit();', 'http://upload.wikimedia.org/wikipedia/commons/3/30/Bv_icon.png');

 //-----------------------
 //  Botao:{Bem vindo ip} ¦
 //-----------------------
    AddMyOwnButton(tbdiv, 'Bem vindo ip', 'javascript:document.editform.wpSummary.value=\'\{\{bem vindo\}\}\';insertTags(\'\{\{bem vindo ip}} \~\~\~\~\',\'\',\'\');document.editform.submit();', 'http://upload.wikimedia.org/wikipedia/commons/5/54/Bvip_icon.png');

 //---------------
 //  Botao:{lixo} ¦
 //---------------
    AddMyOwnButton(tbdiv, 'Lixo', 'javascript:document.editform.wpSummary.value=\'ER-20\';insertTags(\'\{\{ER1|20|\~\~\~\~\}\}\\n\',\'\',\'\');document.editform.submit();', 'http://upload.wikimedia.org/wikipedia/commons/e/e4/Bouton_Vandale3.png');

 //-------------------
 //  Botao:correlatos |
 //*******************
    AddMyOwnButton(tbdiv, 'Correlatos', 'javascript:document.editform.wpSummary.value=\'\+correlato\';insertTags(\'{\{Correlatos \\n\|\commons= \\n\|\wikiquote= \\n\|\wikcionário= \\n\|\wikilivros= \\n\|\wikinotícias= \\n\|\wikisource= \\n\|\wikispecies= \\n\|\meta= \\n\}\}\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/3/35/Sister_icon.png');



  }
}

window.myAddOnload=function(f) {
  if (window.addEventListener) window.addEventListener("load", f, false);
  else if (window.attachEvent) window.attachEvent("onload",f);
}

myAddOnload(myOwnEditButtons);

 /*************************************************************
  *                                                           *
  *          Terminam  aqui   os   Botões adicionais          *
  *                                                           *
  *************************************************************/


 /*************************************************************
  *                                                           *
  *      "Link Complete", Usuário Zocky, Wikipédia de         *
  *                    língua inglesa.                        *
  *                                                           *
  *************************************************************/

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

 /** Extra toolbar options ****************************************************** <nowiki>
  *
  *  Description: UNDOCUMENTED
  *  Maintainers: [[User:MarkS]]?, [[User:Voice of All]], [[User:R. Koot]]
  */
 
 //This is a modified copy of a script by User:MarkS for extra features added by User:Voice of All.
 // This is based on the original code on Wikipedia:Tools/Editing tools
 // To disable this script, add <code>mwCustomEditButtons = [];<code> to [[Special:Mypage/monobook.js]]
 
 if (mwCustomEditButtons) {
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c8/Button_redirect.png",
     "speedTip": "Redirecionar",
     "tagOpen": "#REDIRECT [[",
     "tagClose": "]]",
     "sampleText": "Inserir link"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c9/Button_strike.png",
     "speedTip": "Tachado",
     "tagOpen": "<s>",
     "tagClose": "</s>",
     "sampleText": "Texto tachado"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/en/1/13/Button_enter.png",
     "speedTip": "Quebra de linha",
     "tagOpen": "<br />",
     "tagClose": "",
     "sampleText": ""};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/en/8/80/Button_upper_letter.png",
     "speedTip": "Sobrescrito",
     "tagOpen": "<sup>",
     "tagClose": "</sup>",
     "sampleText": "Texto sobrescrito"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/en/7/70/Button_lower_letter.png",
     "speedTip": "Subscrito",
     "tagOpen": "<sub>",
     "tagClose": "</sub>",
     "sampleText": "Texto subscrito"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/en/5/58/Button_small.png",
     "speedTip": "Fonte pequena",
     "tagOpen": "<small>",
     "tagClose": "</small>",
     "sampleText": "Texto pequeno"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/en/3/34/Button_hide_comment.png",
     "speedTip": "Inserir comentário oculto",
     "tagOpen": "<!-- ",
     "tagClose": " -->",
     "sampleText": "Comentário"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/en/1/12/Button_gallery.png",
     "speedTip": "Inserir galeria de imagens",
     "tagOpen": "\n<gallery>\n",
     "tagClose": "\n</gallery>",
     "sampleText": "Imagem:Exemplo.jpg|Legenda1\nImagem:Examplo.jpg|Legenda2"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/en/6/60/Button_insert_table.png",
     "speedTip": "Inserir tabela",
     "tagOpen": '{| class="wikitable"\n|-\n',
     "tagClose": "\n|}",
     "sampleText": "! cabeçalho 1\n! cabeçalho 2\n! cabeçalho 3\n|-\n| linha 1, célula 1\n| linha 1, célula 2\n| linha 1, célula 3\n|-\n| linha 2, célula 1\n| linha 2, célula 2\n| linha 2, célula 3"};
 }


 /*************************************************************
  *                                                           *
  *        Iniciam-se aqui as personalizações do WikEd        *
  *                                                           *
  *************************************************************/
var wikEdMainCSS = [];
var wikEdMainCSS['.wikEdButton'] = 'background: white;';
var wikEdShowSourceButton = true;