Usuário:Roni1986/monobook.js
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.
/** Botões extras de edição *********************************************************************************
* Origem: [[Wikipedia:Software/Scripts/Botõesextrasdeedição.js]]
* Ajuda: [[Wikipedia:Software/Scripts/Botões extra de edição]]
* Descrição: Acrescenta algums botões extra no menu de edição
* Autor: [[:en:User:MarkS]]
********************************************************************************************/
mw.loader.load('https://pt.wikipedia.org/w/index.php?title=Wikipedia:Software/Scripts/Botõesextrasdeedição.js&action=raw&ctype=text/javascript');
{XEBOrder='A,B,C,D,D1,E,F,J1,J2,K,M,N,O,P,P1,Q,R,R1,R2,R3,R4,S,T,TS,TC,TE,TR,T1,TL,U,V,W,X,Y1,Y2,Z,AI,GEO,TALK';
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, 'txt2predef', 'javascript:insertTags(\'{\{\',\'}\}\',\'\');', 'https://upload.wikimedia.org/wikipedia/commons/9/97/Template_button.png');
// Botao:<small>
AddMyOwnButton(tbdiv, '<small></small>', 'javascript:insertTags(\'<small>\',\'</small>\',\'\');', 'https://upload.wikimedia.org/wikipedia/commons/5/58/Button_small.png');
// Botao:<strike>
AddMyOwnButton(tbdiv, '<s></s>', 'javascript:insertTags(\'<s>\',\'</s>\',\'\');', 'https://upload.wikimedia.org/wikipedia/commons/3/30/Btn_toolbar_rayer.png');
// Botao:<tt>
AddMyOwnButton(tbdiv, '<tt></tt>', 'javascript:insertTags(\'<tt>\',\'</tt>\',\'\');', 'https://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* \',\'\',\'\');', 'https://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\',\'\',\'\');', 'https://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\[\[\',\']]\',\'\');', 'https://upload.wikimedia.org/wikipedia/commons/c/c8/Button_redirect.png');
// Botao:categoria
AddMyOwnButton(tbdiv, 'categoria', 'javascript:document.editform.wpSummary.value=\'\+cat\';insertTags(\'[\[Categoria:\',\']]\',\'\');', 'https://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\',\'\',\'\');', 'https://upload.wikimedia.org/wikipedia/commons/d/de/Button_image.png');
// Botao:{Bem vindo ip}
AddMyOwnButton(tbdiv, 'Bem vindo ip', 'javascript:document.editform.wpSummary.value=\'\{\{bem vindo\}\}\';insertTags(\'\{\{bem vindo ip}} \~\~\~\~\',\'\',\'\');document.editform.submit();', 'https://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 = 'https://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();', 'https://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();', 'https://upload.wikimedia.org/wikipedia/commons/e/e4/Bouton_Vandale3.png');
// Botao:{aviso1}
AddMyOwnButton(tbdiv, 'aviso1', 'javascript:document.editform.wpSummary.value=\'\{\{aviso\}\}\';insertTags(\'\{\{aviso1|\}\}\{\{\{1|~\~\~\~\}\}\}\',\'\',\'\');', 'https://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();', 'https://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|~\~\~\~\}\}\}\',\'\',\'\');', 'https://upload.wikimedia.org/wikipedia/commons/3/3a/Button_av-img.png');
// Botao:{DP}
AddMyOwnButton(tbdiv, 'dp', 'javascript:document.editform.wpSummary.value=\'\{\{DP\}\}\';insertTags(\'\{\{DP}}\',\'\',\'\');', 'https://upload.wikimedia.org/wikipedia/commons/9/91/Button_pd.png');
// Botao:{GFDL}
AddMyOwnButton(tbdiv, 'gfdl', 'javascript:document.editform.wpSummary.value=\'\{\{GFDL\}\}\';insertTags(\'\{\{GFDL}}\',\'\',\'\');', 'https://upload.wikimedia.org/wikipedia/commons/f/fe/Button_gnu.png');
}
}
window.myAddOnload=function(f) {
if (window.addEventListener) window.addEventListener("load", f, false);
else if (window.attachEvent) window.attachEvent("onload",f);
}
myAddOnload(myOwnEditButtons);
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();', 'https://upload.wikimedia.org/wikipedia/commons/3/30/Bv_icon.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\',\'\',\'\');', 'https://upload.wikimedia.org/wikipedia/commons/0/04/Button_array.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\}\}\',\'\',\'\');', 'https://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);
rmEditButtons=[all];
myButtons=[];
XEBPopups=true;
XEBExtendEditSummary=true;
XEBHideDelay=3.0;}
//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:{ER}
caption = '\{\er1||2=\~\~\~\~\}';
var bas = document.createElement('a');
bas.href = 'javascript:insertTags(\'{\{er1|\',\'\<</span>número da regra>\|2=\~\~\~\~\}}\',\'\');';
var imgs = document.createElement('img');
imgs.src = 'https://upload.wikimedia.org/wikipedia/commons/1/11/Button_ER.png';
imgs.alt = caption;
bas.appendChild(imgs);
tbdiv.appendChild(bas);
}
}
window.myAddOnload=function(f) {
if (window.addEventListener) window.addEventListener("load", f, false);
else if (window.attachEvent) window.attachEvent("onload",f);
}
myAddOnload(myOwnEditButtons);
//<noinclude>[[Categoria:!Subpáginas de Roni1986/Configurações(JS-CSS)|Monobook.js]]</noinclude>