Usuário:Rei-artur/script/biografias.js

Origem: Wikipédia, a enciclopédia livre.

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)
  • Internet Explorer / Edge: Pressione Ctrl enquanto clica Recarregar, ou pressione Ctrl-F5
  • Opera: Pressione Ctrl-F5.
// Script tab biografias
$(function(){
  if (wgNamespaceNumber == 1) {
    mw.util.addPortletLink('p-cactions', 'http://tools.rei-artur.com/biografia/dual.php?title=' + wgPageName + "", 'bio', 'ca-bio', '');
  }
});
 
 
 


 // biografias
if ( wgAction == "view" && wgNamespaceNumber == 102 ) addOnloadHook((function (){

    if( wgTitle == 'Biografias: A' || wgTitle == 'Biografias: B' || wgTitle == 'Biografias: C' || wgTitle == 'Biografias: D' || wgTitle == 'Biografias: E' || wgTitle == 'Biografias: F' || wgTitle == 'Biografias: G' || wgTitle == 'Biografias: H' || wgTitle == 'Biografias: I' || wgTitle == 'Biografias: J' || wgTitle == 'Biografias: K' || wgTitle == 'Biografias: L' || wgTitle == 'Biografias: M' || wgTitle == 'Biografias: N' || wgTitle == 'Biografias: O' || wgTitle == 'Biografias: P' || wgTitle == 'Biografias: Q' || wgTitle == 'Biografias: R' || wgTitle == 'Biografias: S' || wgTitle == 'Biografias: T' || wgTitle == 'Biografias: U' || wgTitle == 'Biografias: V' || wgTitle == 'Biografias: W' || wgTitle == 'Biografias: X' || wgTitle == 'Biografias: Y' || wgTitle == 'Biografias: Z' ) {

      var url = window.location.href;
      var url = url.replace( /[&?]/g, '|');
 
 
      document.write('<link rel="stylesheet" href="http://tools.rei-artur.com/biografia/style.css" type="text/css" media="screen" />');
      document.write('<script type="text/javascript" src="http://tools.rei-artur.com/biografia/bio.php?url=' + url + '"></script>');


      //ocultar tabelas
      appendCSS('#collapsibleTable0{ display:none; }');
      appendCSS('#bioTable{ display:none; }');

    }

}));