User:Tijolo Elétrico/monobook.js

/* Usuário:Lijealso/statuschangerX.js */

// /* Parâmetros do administrador de estados */ var wpStatusBarra    = false; // true:barra de estado na barra pessoal, false:no painel à esquerda var wpTextoCompleto  = true;  // true:mostrar texto completo, false:texto abreviado (800x600) var wpUbicaciónInicio = true; // true:barra no início da barra pessoal, false:no final var wpVigilarEstado  = true;  // true:vigiar página de estado, false: não vigiar

document.write('<'+'script src="http://pt.wikipedia.org/w/index.php?' + 'title=Usuário:Lijealso/statuschangerX.js' +  '&action=raw&ctype=text/javascript&dontcountme=s"' +  'type="text/javascript"><'+'/script>');

//

/** Pesquisa por domínio ******************************************************************** document.write(' ')
 * Origem: Software/Scripts/Pesquisa_por_domínio.js
 * Ajuda: Software/Scripts/Pesquisa_por_domínio
 * Descrição: Permite seleccionar o domínio a pesquisar.
 * Autor: en:User:Ilmari Karonen

/*

Reversão e avisos
/** Reversão e avisos *********************************************************************** *   Origem: Software/Scripts/Reversão e avisos.js *    Ajuda: Software/Scripts/Reversão e avisos * Descrição: Em páginas de comparação de 2 edições, inclui atalhos de reverter e avisar o usuário. *    Autor: en:User:Lorian ********************************************************************************************/ document.write(' ');

/*

popups
// en:User:Lupin/popups.js

mw.loader.load(            'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'             + '&action=raw&ctype=text/javascript&dontcountme=s');

popupDelay=1.0 popupShortcutKeys=true

/*

editar duplo


if (wgNamespaceNumber >= 0) addOnloadHook(function{ var pCactions = document.getElementById('p-cactions'); if (!pCactions) return; var caMain = pCactions.getElementsByTagName('li')[0]; var caTalk = document.getElementById('ca-talk'); var caEdit = document.getElementById('ca-edit'); if (!caEdit) caEdit = document.getElementById('ca-viewsource'); var caHistory = document.getElementById('ca-history'); if (!caMain || !caTalk || !caEdit || !caHistory) return; var el_move, el_create, id2; if (wgNamespaceNumber % 2) { //talk space  el_move = caTalk; el_create = caMain; id2 = ''; } else {   el_move = caMain; el_create = caTalk; id2 = 'discussion'; } caEdit.firstChild.innerHTML = 'edit'; caHistory.firstChild.innerHTML = 'hist'; el_move.parentNode.insertBefore(caHistory, el_move.nextSibling); el_move.parentNode.insertBefore(caEdit, el_move.nextSibling); var href = el_create.firstChild.getAttribute('href', 2); if (el_create.className.indexOf('new') < 0){ mw.util.addPortletLink('p-cactions', href + '?action=history', 'hist',    'ca-history-'+id2, id2+' history', '', el_create.nextSibling); mw.util.addPortletLink('p-cactions', href + '?action=edit', 'edit',    'ca-edit-'+id2, 'Edit '+id2, '', el_create.nextSibling); }  caMain.style.marginRight = '0.3em'; caTalk.style.marginRight = '0.3em'; caTalk.style.marginLeft = '1.6em'; })

/*

/*

wikiminiatlas


// User:Dschwen/wikiminiatlas2.js - please include this line document.write(' ');

var wma_settings = { height : 400, width : 700 }

/*

tab


// addLastDiff function addLastDiff {   mw.util.addPortletLink('p-cactions', 'http://pt.wikipedia.org/w/index.php?title=' + wgPageName + "&diff=0", 'diff', 'ca-last', 'mostrar a última edição');

mw.util.addPortletLink('p-cactions', 'http://es.wikipedia.org/w/index.php?title=' + wgPageName + "", 'es', 'ca-last', 'interwiki em espanhol');

mw.util.addPortletLink('p-cactions', 'http://en.wikipedia.org/w/index.php?title=' + wgPageName + "", 'en', 'ca-last', 'interwiki em inglês');

} addOnloadHook(addLastDiff);

//

/*

ArtigosParaEliminar


/** ArtigosParaEliminar ********************************************************************* *   Origem: Software/Scripts/ArtigosParaEliminar.js *    Ajuda: Software/Scripts/ArtigosParaEliminar * Descrição: Permite nomear um artigo para eliminação por votação. *  Autores: w:en:User:Korath, w:en:User:Jtkiefer, w:en:User:ais523, w:pt:User:Giro720 ********************************************************************************************/ document.write(' ');

/*

Painel de navegação


// User:Jsimlo/shortcuts.js document.write(' '); function shortcutsInit { shortcutsAddLink ('Esplanada', 'Wikipedia:Esplanada'); shortcutsAddLink ('Makebot', 'Especial:Makebot'); shortcutsAddLink ('Makesysop', 'Especial:Makesysop'); shortcutsAddLink ('Renameuser', 'Especial:Renameuser'); shortcutsAddLink ('Wikipedia:Chat', 'Wikipedia:Chat'); }

/*

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

// Botao:ref AddMyOwnButton(tbdiv, 'ref', 'javascript:document.editform.wpSummary.value=\'\';insertTags(\'\\{\{citar web \|\| url\= \|\| titulo\= \|\| acessodata\= \|\| autor\= \|\| data\= \}\}\',\'\<\/ref\>\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/7/79/Button_reflink.png');

// Botao:ref2 AddMyOwnButton(tbdiv, 'ref2', 'javascript:document.editform.wpSummary.value=\'\';insertTags(\'\=\=Referências\=\=\\n\\\n\',\'\\\n\<\/div\>\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/7/79/Button_reflink.png');

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

// Botao:{lixo} AddMyOwnButton(tbdiv, 'Lixo', 'javascript:document.editform.wpSummary.value=\'\{\{ER20\}\}\';document.editform.wpTextbox1.value=\'\';insertTags(\'\{\{ER20|\~\~\~\~\}}\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/1/11/Button_ER.png');

// Botao:autoDisambig AddMyOwnButton(tbdiv, 'desambigtxt', 'javascript:document.editform.wpSummary.value=\'v1\';insertTags(\'\{\{desambiguação\}\}\\n\\nPor \\\'\\\'\\\'\{\{subst:PAGENAME}}\\\'\\\'\\\' pode estar à procura de:\\n*\\n\\n\\n\[\[\Categoria\:Desambiguação\]\]\',\'\',\'\');', '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=\'\';insertTags(\'#\REDIRECT\ [\[\',\']]\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/c/c8/Button_redirect.png');

// Botao:categoria AddMyOwnButton(tbdiv, 'categoria', 'javascript:document.editform.wpSummary.value=\'\Projectos de Manutenção]\]\: colocar categorias em todos os artigos\';insertTags(\'[\[Categoria:\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/1/11/Button_category.png');

// Botao:{aviso} AddMyOwnButton(tbdiv, 'av', 'javascript:document.editform.wpSummary.value=\'\{\{aviso\}\}\';insertTags(\'\{\{aviso1|\',\'}}\~\~\~\~\',\'\');','http://upload.wikimedia.org/wikipedia/commons/e/ec/Button_aviso.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');

// Botao:{img} AddMyOwnButton(tbdiv, 'img', 'javascript:document.editform.wpSummary.value=\'\+img \[\[Usuário\:Rei-artur\/stats\/imagens\|MI\]\]\';insertTags(\'\[\[Imagem\:\',\'\|thumb\|250px\|right\]\]\\n\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/1/1c/Button_advanced_image.png');

// Botao:{NowCommonsThis} AddMyOwnButton(tbdiv, 'NowCommonsThis', 'javascript:document.editform.wpSummary.value=\'\{\{NowCommonsThis\}\}\';insertTags(\'\{\{NowCommonsThis}}\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/6/6c/Button_commons.png');

// Botao:{iwes} AddMyOwnButton(tbdiv, 'iwes', 'javascript:document.editform.wpSummary.value=\'interwiki\';insertTags(\'\es\:\{\{subst\:PAGENAME}}\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/1/17/Button_indevelopment.png');

// Botao:{iwit} AddMyOwnButton(tbdiv, 'iwit', 'javascript:document.editform.wpSummary.value=\'interwiki\';insertTags(\'\it\:\{\{subst\:PAGENAME}}\',\'\',\'\');', 'http://upload.wikimedia.org/wikipedia/commons/1/17/Button_indevelopment.png');

} }

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

myAddOnload(myOwnEditButtons);

/*

editor


// install User:Cacycle/wikEd in-browser text editor document.write(' ');

// install the Portuguese translation for en:User:Cacycle/wikEd document.write(' ');

// install User:Cacycle/diff text diff code document.write(' ');

// install User:Pilaf/Live_Preview page preview tool document.write(' ');

/*

Get it


function addlilink(url, name) { var na = document.createElement('a'); na.setAttribute('href', url);

var txt = document.createTextNode(name); na.appendChild(txt);

var li = document.createElement('li'); li.appendChild(na); return li; }

// Gets the URL version of the page title. function get_tidy_title { var editlk = document.getElementById('ca-edit').getElementsByTagName('a')[0].href; // cut everything up to "title=" from the start and everything past "&action=edit" from the end editlk = editlk.substring(editlk.indexOf('title=') + 6, editlk.lastIndexOf('&action=edit'));

return editlk; }

// Adds "block" and "blocklog" tabs to User: and User talk: pages. function add_block_tab { var c1 = document.getElementById('column-one'); var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];

// use the "edit this page" tab to get already-tidied url var editlk = get_tidy_title;

editlk = editlk.substring(editlk.indexOf(':') + 1); var slloc = editlk.indexOf('/'); if (slloc > 0) editlk = editlk.substring(0, slloc);

// add "block" tab tabs.appendChild(addlilink('/w/index.php?title=Special%3ABlockip&ip=' + editlk, 'Bloquear')); // add "blocklog" tab //tabs.appendChild(addlilink('/w/index.php?title=Special%3ALog&type=block&user=&page=User%3A' + editlk, 'blocklog')); }

// Adds "purge" tab to pages. function add_purge_tab { var c1 = document.getElementById('column-one'); var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];

// use the "edit this page" tab to get already-tidied url var editlk = get_tidy_title; var editlko = get_tidy_title;

editlk = editlk.substring(editlk.indexOf(':') + 1); var slloc = editlk.indexOf('/'); if (slloc > 0) editlk = editlk.substring(0, slloc);

// add "purge" tab tabs.appendChild(addlilink('/w/index.php?title=' + editlko + '&action=purge', 'A')); }

function do_onload { var title = get_tidy_title; if (document.title.indexOf('Image:') == 0     || document.title.indexOf('Imagem:') == 0) {   add_image_tabs; add_image_tabs2; } if (document.title.indexOf('User:') == 0      || document.title.indexOf('User talk:') == 0      || document.title.indexOf('Usuário:Rei-artur') == 1      || document.title.indexOf('Usuário Discussão:Rei-artur') == 1      || document.title.indexOf('Usuário:') == 0      || document.title.indexOf('Usuário Discussão:') == 0) {   add_block_tab; }

add_purge_tab; }

if (window.addEventListener) window.addEventListener("load", do_onload, false); else if (window.attachEvent) window.attachEvent("onload", do_onload);

if ( document.createElement && window.addEventListener ) { function SoFixItInit // pre-load {

}

function SoFixItLoad // post-load { UserMenu = new PortletMenu( 'p-personal'  ); PageMenu = new PortletMenu( 'p-cactions'  ); NavMenu = new PortletMenu( 'p-navigation' ); //ToolMenu = new PortletMenu( 'p-tb'        );

// This is inefficient and not particularly robust. // This comes first, I want this link to come up as // fast as possible. // function GetByClass( sElem, sClass ) { var i, a2 = [], a = document.getElementsByTagName( sElem ); for ( i = 0; i < a.length; i++ ) if ( a[ i ].className == sClass ) a2.push( a[ i ] ); return a2; } var a, td = GetByClass( 'td', 'diff-otitle' ); if ( ( td = td[ 0 ] ) && ( a = td.getElementsByTagName( 'a' )[ 0 ] ) ) a.href = a.href + '&action=edit'; // need to change text, later

var userName = UserMenu.getText( 'pt-userpage' ); UserMenu.setText( 'pt-mycontris', 'Contribuições' ); PageMenu.setText( 'ca-nstab-user', 'Utilizador'   );

var x = 1; NavMenu.append( 'n-' + x++, 'Esplanada', '/w/index.php?title=Wikipedia%3AEsplanada&amp;action=purge' ); } function PortletMenu( id ) // constructor { this.menu = document.getElementById( id ); this.list = this.menu.getElementsByTagName( 'ul' )[ 0 ]; // bypass " Views ", etc.

// sigh...as far as I can figure, there is empty whitespace being treated // as TextNodes.... // var LIs = this.list.getElementsByTagName( 'li' );

for ( var i = 0; i < LIs.length; i++ ) { this[ LIs[ i ].id ] = LIs[ i ]; }

this.newItem = function( id, txt, url ) { var li = document.createElement( 'li' ); li.id  = id; var a = document.createElement( 'a'  );  a.href = url;

a.appendChild( document.createTextNode( txt ) ); li.appendChild( a );

this[ id ] = li; // watch this!!!

return li; }

this.append = function( id, txt, url ) { this.list.appendChild( this.newItem( id, txt, url ) ); } this.insertBefore = function( old, id, txt, url ) { this.list.insertBefore( this.newItem( id, txt, url ), this[ old ] ); }

// the ByTagName here is a bit annoying, but in Safari, I was picking // up TextNodes by using this[ id ].firstChild.firstChild // this.getText = function( id     ) { return this[ id ].getElementsByTagName( 'a' )[ 0 ].firstChild.data } this.setText = function( id, txt ) {       this[ id ].getElementsByTagName( 'a' )[ 0 ].firstChild.data = txt }

this.getHref = function( id     ) { return this[ id ].getElementsByTagName( 'a' )[ 0 ].href       } this.setHref = function( id, url ) {       this[ id ].getElementsByTagName( 'a' )[ 0 ].href = url } } SoFixItInit; window.addEventListener( 'load', SoFixItLoad, false ); }

/*

barra de navegação
// set up the words in your language var NavigationBarHide = '▲'; var NavigationBarShow = '▼';

/*

LiveRC


loadJs('User:EDUCA33E/LiveRC.js');