/*
==Alteração da sig==
*/
window.myAddOnload=function(f) {
if (window.addEventListener) window.addEventListener("load", f, false);
else if (window.attachEvent) window.attachEvent("onload",f);
}
window.changeSig=function() {
var tbdiv=document.getElementById('toolbar');
if (tbdiv) {
var but = document.getElementById('toolbar').getElementsByTagName('a');
if (but) {
but.href='javascript:insertTags(\'-- {\{User:Slade/Assinatura}} \~\~\~\',\'\',\'\');';
}
}
}
myAddOnload(changeSig);
/* Any JavaScript here will be loaded for all users on every page load. */
/** Extra toolbar options ****************************************************** <nowiki>
*
* Description: UNDOCUMENTED
* Maintainers: ]?, ], ]
*/
//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 ]
if (typeof mwCustomEditButtons !== 'undefined') {
mwCustomEditButtons = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c8/Button_redirect.png",
"speedTip": "Redirect",
"tagOpen": "#REDIRECT [[",
"tagClose": "]]",
"sampleText": "Insert text"};
mwCustomEditButtons = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c9/Button_strike.png",
"speedTip": "Strike",
"tagOpen": "<s>",
"tagClose": "</s>",
"sampleText": "Strike-through text"};
mwCustomEditButtons = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/1/13/Button_enter.png",
"speedTip": "Line break",
"tagOpen": "<br />",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/8/80/Button_upper_letter.png",
"speedTip": "Superscript",
"tagOpen": "<sup>",
"tagClose": "</sup>",
"sampleText": "Superscript text"};
mwCustomEditButtons = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/7/70/Button_lower_letter.png",
"speedTip": "Subscript",
"tagOpen": "<sub>",
"tagClose": "</sub>",
"sampleText": "Subscript text"};
mwCustomEditButtons = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/5/58/Button_small.png",
"speedTip": "Small",
"tagOpen": "<small>",
"tagClose": "</small>",
"sampleText": "Small Text"};
mwCustomEditButtons = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/3/34/Button_hide_comment.png",
"speedTip": "Insert hidden Comment",
"tagOpen": "<!-- ",
"tagClose": " -->",
"sampleText": "Comment"};
mwCustomEditButtons = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/1/12/Button_gallery.png",
"speedTip": "Insert a picture gallery",
"tagOpen": "\n<gallery>\n",
"tagClose": "\n</gallery>",
"sampleText": "Image:Example.jpg|Caption1\nImage:Example.jpg|Caption2"};
mwCustomEditButtons = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/f/fd/Button_blockquote.png",
"speedTip": "Insert block of quoted text",
"tagOpen": "<blockquote>\n",
"tagClose": "\n</blockquote>",
"sampleText": "Block quote"};
mwCustomEditButtons = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/6/60/Button_insert_table.png",
"speedTip": "Insert a table",
"tagOpen": '{| class="wikitable"\n|-\n',
"tagClose": "\n|}",
"sampleText": "! header 1\n! header 2\n! header 3\n|-\n| row 1, cell 1\n| row 1, cell 2\n| row 1, cell 3\n|-\n| row 2, cell 1\n| row 2, cell 2\n| row 2, cell 3"};
}
/*</nowiki>*/
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:<tt>
AddMyOwnButton(tbdiv, '<tt></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:{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:{lixo}
AddMyOwnButton(tbdiv, 'Lixo', 'javascript:document.editform.wpSummary.value=\'\{\{lixo\}\}\';insertTags(\'\{\{lixo|1=\~\~\~\~\}}\',\'\',\'\');document.editform.submit();', 'http://upload.wikimedia.org/wikipedia/commons/e/e4/Bouton_Vandale3.png');
// Botao:{impróprio}
AddMyOwnButton(tbdiv, 'Impróprio', 'javascript:document.editform.wpSummary.value=\'\{\{impróprio\}\}\';document.editform.wpTextbox1.value=\'\';insertTags(\'\{\{impróprio|1=\~\~\~\~}}\',\'\',\'\');document.editform.submit();', 'http://upload.wikimedia.org/wikipedia/commons/f/f0/Bouton_Vandale0.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: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:correlatos
AddMyOwnButton(tbdiv, 'correlatos', 'javascript:document.editform.wpSummary.value=\'\+correlato\';insertTags(\'{\{Começa correlatos}\}\\n\{\{Correlato\|\commons\|}\}\\n\{\{Correlato\|\wikiquote\|}\}\\n\{\{Correlato\|\wikcionário\|}\}\\n\{\{Correlato\|\wikilivros\|}\}\\n\{\{Correlato\|\wikinotícias\|}\}\\n\{\{Correlato\|\wikisource\|}\}\\n\{\{Correlato\|\wikispecies\|}\}\\n\{\{Correlato\|\meta\|}\}\\n\{\{Termina correlatos}\}\\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);