Usuário(a):Catalina/monobook.js
Aspeto
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)
- Edge: Pressione Ctrl enquanto clica Recarregar, ou pressione Ctrl-F5.
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:{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:{{ }}
AddMyOwnButton(tbdiv, 'txt2predef', 'javascript:insertTags(\'{\{\',\'}\}\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/9/97/Template_button.png');
// Botao:<small>
AddMyOwnButton(tbdiv, '<small></small>', 'javascript:insertTags(\'<small>\',\'</small>\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/5/58/Button_small.png');
// Botao:<strike>
AddMyOwnButton(tbdiv, '<s></s>', 'javascript:insertTags(\'<s>\',\'</s>\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/3/30/Btn_toolbar_rayer.png');
// Botao:<tt>
AddMyOwnButton(tbdiv, '<tt></tt>', 'javascript:insertTags(\'<tt>\',\'</tt>\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/3/30/Tt_icon.png');
// Botao:Disambig
AddMyOwnButton(tbdiv, 'desambigtxt', 'javascript:document.editform.wpSummary.value=\'v1\';insertTags(\'\{\{desambiguação\}\}\\n\\nPor \\\'\\\'\\\'\{\{subst:PAGENAME}}\\\'\\\'\\\' pode estar à procura de:\\n* \',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/6/62/Button_desambig.png');
// Botao:CaixaSucessao
AddMyOwnButton(tbdiv, 'Caixa de sucessão', 'javascript:document.editform.wpSummary.value=\'+cxsucc\';insertTags(\'\{\{Começa caixa\}\}\\n\{\{Caixa de sucessão\|\\n\|título = \\n\|anos = \\n\|antes = \\n\|depois = \\n\}\}\\n\{\{Termina caixa\}\}\\n\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/8/8f/Cs_icon.png');
// Botao:redirect
AddMyOwnButton(tbdiv, 'redirect', 'javascript:document.editform.wpSummary.value=\'\#\R\E\D\';insertTags(\'#\REDIRECT\[\[\',\']]\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/c/c8/Button_redirect.png');
// Botao:categoria
AddMyOwnButton(tbdiv, 'categoria', 'javascript:document.editform.wpSummary.value=\'\+cat\';insertTags(\'[\[Categoria:\',\']]\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/1/11/Button_category.png');
// Botao:LicencaIncompleta
AddMyOwnButton(tbdiv, '\{\{SemInfo\}\}', 'javascript:document.editform.wpSummary.value=\'Aviso: Licença Incompleta\';insertTags(\';Descrição\\n:(informar aqui, por favor)\\n;Fonte\\n:(informar aqui, por favor)\\n;Licença\\n:\{\{subst:\Cd2}} <\!-- troque esta predefinição pela tag do respectivo copyright -->\\n\[\[Categoria:Imagens de origem desconhecida\]\] <\!-- remova esta categoria após indicar a fonte -->\\n\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/d/de/Button_image.png');
// Botao:Tabela
AddMyOwnButton(tbdiv, 'Inserir tabela', 'javascript:document.editform.wpSummary.value=\'\+tab\';insertTags(\'\{\| \\class="wikitable"\\n\\|\-\\n\! titulo 1 \\n\! titulo 2 \\n\! titulo 3 \\n\|\-\\n\| linha 1 \\n\| linha 2 \\n\| linha 3 \\n\|\-\\n\| linha 1 \\n\| linha 2 \\n\| linha 3 \\n\|\}\\n\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/0/04/Button_array.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:{bv-av}
caption = '\{\bv-av|}';
var bas = document.createElement('a');
bas.href = 'javascript:insertTags(\'{\{subst:bv-av|\',\'\\}} \~\~\~\~\',\'\');';
var imgs = document.createElement('img');
imgs.src = 'http://upload.wikimedia.org/wikipedia/commons/1/11/Button_ER.png';
imgs.alt = caption;
bas.appendChild(imgs);
tbdiv.appendChild(bas);
// Botao:{impróprio}
AddMyOwnButton(tbdiv, 'Impróprio', 'javascript:document.editform.wpSummary.value=\'ER-20\';insertTags(\'\{\{ER1|20|\~\~\~\~\}\}\\n\',\'\',\'\');document.editform.submit();', 'http://upload.wikimedia.org/wikipedia/commons/f/f0/Bouton_Vandale0.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:{aviso1}
AddMyOwnButton(tbdiv, 'aviso1', 'javascript:document.editform.wpSummary.value=\'\{\{aviso\}\}\';insertTags(\'\{\{aviso1|\}\}\{\{\{1|~\~\~\~\}\}\}\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/e/ec/Button_aviso.png');
// Botao:{NowCommonsThis}
AddMyOwnButton(tbdiv, 'NowCommonsThis', 'javascript:document.editform.wpSummary.value=\'\{\{NowCommonsThis\}\}\';insertTags(\'\{\{NowCommonsThis}}\',\'\',\'\');document.editform.submit();', 'http://upload.wikimedia.org/wikipedia/commons/6/6c/Button_commons.png');
// Botao:{av-img}
AddMyOwnButton(tbdiv, 'avimg', 'javascript:document.editform.wpSummary.value=\'\{\{av-img\}\}\';insertTags(\'\{\{av-img|}}\{\{\{1|~\~\~\~\}\}\}\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/3/3a/Button_av-img.png');
// Botao:{DP}
AddMyOwnButton(tbdiv, 'dp', 'javascript:document.editform.wpSummary.value=\'\{\{DP\}\}\';insertTags(\'\{\{DP}}\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/9/91/Button_pd.png');
// Botao:{GFDL}
AddMyOwnButton(tbdiv, 'gfdl', 'javascript:document.editform.wpSummary.value=\'\{\{GFDL\}\}\';insertTags(\'\{\{GFDL}}\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/f/fe/Button_gnu.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/4/4c/Button_interprojet.png');
}
}
window.myAddOnload=function(f) {
if (window.addEventListener) window.addEventListener("load", f, false);
else if (window.attachEvent) window.attachEvent("onload",f);
}
myAddOnload(myOwnEditButtons);