Usuário:Sonlui/monobook.js
Origem: Wikipédia, a enciclopédia livre.
Nota: Após salvar, terá de limpar a cache do seu navegador para ver as alterações: Mozilla: clique Reload (ou Ctrl-R), IE / Opera: Ctrl-F5, Safari: Cmd-R, Konqueror Ctrl-R.
/* ==MyOwnEditButtons== */ //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:{{ }} AddMyOwnButton(tbdiv, 'txt2predef', 'javascript:insertTags(\'{{\',\'}}\',\'\');', 'http://republico.estv.ipv.pt/~nmct/wikipedia/icons/button_topredef.png'); // Botao:{aviso1} AddMyOwnButton(tbdiv, '{{aviso1}}', 'javascript:document.editform.wpSummary.value=\'\{\{aviso\}\}\';insertTags(\'\{\{aviso1|}} \~\~\~\~\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/e/ec/Button_aviso.png'); // Botao:{aviso1-bl1} AddMyOwnButton(tbdiv, '{{aviso1}}', 'javascript:document.editform.wpSummary.value=\'\{\{aviso\}\}\';insertTags(\'\{\{aviso1|}} A continuar será bloqueado. Contribua em vez de estragar! \~\~\~\~\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/e/ec/Button_aviso.png'); // Botao:{aviso1-bl2} AddMyOwnButton(tbdiv, '{{aviso1}}', 'javascript:document.editform.wpSummary.value=\'\{\{aviso\}\}\';insertTags(\'\{\{aviso1|}} Bloqueado. Foi avisado. \~\~\~\~\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/e/ec/Button_aviso.png'); // Botao:{Ort} AddMyOwnButton(tbdiv, '{{Ortogr.}}', 'javascript:document.editform.wpSummary.value=\'\{\{ORT\}\}\';insertTags(\'\{\{ORT|}} \~\~\~\~\',\'\',\'\');', 'http://republico.estv.ipv.pt/~nmct/wikipedia/icons/button_tt.png'); // Botao:{bv-av} AddMyOwnButton(tbdiv, '{{bv-av}}', 'javascript:document.editform.wpSummary.value=\'\{\{bv-av\}\}\';insertTags(\'\{\{subst:bv-av|}} \~\~\~\~\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/e/ec/Button_aviso.png'); // Botao:{Bem vindo} AddMyOwnButton(tbdiv, '{{bem vindo}}', 'javascript:document.editform.wpSummary.value=\'\{\{bem vindo\}\}\';insertTags(\'\{\{subst: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 ip\}\}\';insertTags(\'\{\{subst: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=\'\{\{lixo\}\}\';document.editform.wpTextbox1.value=\'\';insertTags(\'\{\{lixo|\~\~\~\~}}\',\'\',\'\');document.editform.submit();', 'http://upload.wikimedia.org/wikipedia/commons/0/0d/User-trash.svg'); // Botao:{impróprio} AddMyOwnButton(tbdiv, 'Impróprio', 'javascript:document.editform.wpSummary.value=\'\{\{impróprio\}\}\';document.editform.wpTextbox1.value=\'\';insertTags(\'\{\{impróprio|\~\~\~\~}}\',\'\',\'\');document.editform.submit();'); // Botao:{aviso} AddMyOwnButton(tbdiv, '{{aviso}}', 'javascript:document.editform.wpSummary.value=\'\{\{aviso\}\}\';insertTags(\'\{\{subst:aviso}} \~\~\~\~\',\'\',\'\');document.editform.submit();', 'http://upload.wikimedia.org/wikipedia/commons/e/ec/Button_aviso.png'); // Botao:{av-cat} AddMyOwnButton(tbdiv, 'Cat', 'javascript:document.editform.wpSummary.value=\'\{\{av-cat\}\}\';insertTags(\'\{\{av-cat|}}\~\~\~\~\',\'\',\'\');'); } } /* ==Load up== */ window.myAddOnload=function(f) { if (window.addEventListener) window.addEventListener("load", f, false); else if (window.attachEvent) window.attachEvent("onload",f); } myAddOnload(myOwnEditButtons);