The Demopædia Encyclopedia on Population is under heavy modernization and maintenance. Outputs could look bizarre, sorry for the temporary inconvenience

Dizionario demografico multilingue (Italiano - prima edizione del 1959)

MediaWiki:Gadget-citations.js

Da Demopædia.
Versione del 12 mar 2012 alle 13:44 di Nicolas Brouard (Discussione | contributi) (una revisione importata: Reftoolbar for TextTerm)

Nota: dopo aver salvato, potrebbe essere necessario pulire la cache del proprio browser per vedere i cambiamenti.

  • Firefox / Safari: tenere premuto il tasto delle maiuscole Shift e fare clic su Ricarica, oppure premere Ctrl-F5 o Ctrl-R (⌘-R su Mac)
  • Google Chrome: premere Ctrl-Shift-R (⌘-Shift-R su un Mac)
  • Internet Explorer: tenere premuto il tasto Ctrl e fare clic su Aggiorna, oppure premere Ctrl-F5
  • Opera: Vai nel Menu → Impostazioni (Opera → Preferenze su un Mac) e poi in Privacy & sicurezza → Pulisci dati del browser → Immagini e file nella cache.
/*  _____________________________________________________________________________
 * |                                                                             |
 * |                    === WARNING: GLOBAL GADGET FILE ===                      |
 * |                  Changes to this page affect many users.                    |
 * | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. |
 * |_____________________________________________________________________________|
 *
 * Imported from version 1.0 as of 17:18, 9 April 2011 (UTC) from [[User:Smith609/citations.js]]
 * Adds a "Citation bot" link to the toolbox, and a button beneath edit fields, see [[User:Smith609/citations]]
 */

// @Version 1.0 - Adds an "Expand citations" link to the toolbox, and a button beneath edit fields.

function addCBToToolbox() {
  if (wgCanonicalNamespace != "Special") {
   var pTb = document.getElementById("p-tb");
   if( !pTb ) return;
   var escPageName = encodeURIComponent(wgPageName);

   addPortletLink("p-tb", "http://toolserver.org/~verisimilus/Bot/citation-bot/doibot.php?edit=toolbar&slow=1&user="+encodeURIComponent(wgUserName)+"&page="+escPageName, 'Expand citations', '', "Expand citations and fix common formatting errors");
    }
}

// Add a citation bot button
function addCitationBot() {
	if (document.getElementById('wpDiff')){
	 var diff = document.getElementById('wpDiff');
	 var cbButton = document.createElement("input");
	 cbButton.value="Citations";
	 cbButton.type="submit";
	 originalAction=document.getElementById('editform').getAttribute('action');
	 cbButton.setAttribute("onmousedown", " document.getElementById('editform').setAttribute('action', 'http://toolserver.org/~verisimilus/Bot/citation-bot/text.php')");
	 cbButton.setAttribute("onkeydown", " document.getElementById('editform').setAttribute('action', 'http://toolserver.org/~verisimilus/Bot/citation-bot/text.php')");
	 diff.setAttribute("onmousedown", originalAction);
	 diff.setAttribute("onkeydown", originalAction);
	 document.getElementById('wpPreview').setAttribute("onmousedown", originalAction);
	 document.getElementById('wpPreview').setAttribute("onkeydown", originalAction);
	 document.getElementById('wpSave').setAttribute("onmousedown", originalAction);
	 document.getElementById('wpSave').setAttribute("onkeydown", originalAction);
	 diff.parentNode.insertBefore(cbButton, diff.nextSibling);
	}

}
addOnloadHook(addCitationBot);
if( skin == "myskin" || skin == "simple" || skin == "monobook" || skin == "modern" || skin == "chick" || skin == "vector") {
  addOnloadHook(addCBToToolbox);
}