Utente:Sanjilops/monobook.js: differenze tra le versioni
Vai alla navigazione
Vai alla ricerca
Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica |
Nessun oggetto della modifica |
||
Riga 70: | Riga 70: | ||
//disablehideEdit=1; |
//disablehideEdit=1; |
||
function createAlert () { |
function createAlert () { |
||
Riga 75: | Riga 76: | ||
if ( Alert.getAttribute('id') == "alert" ) { |
if ( Alert.getAttribute('id') == "alert" ) { |
||
var stringa = Alert.innerHTML; |
var stringa = Alert.innerHTML; |
||
document.getElementsByTagName('body')[0] |
var bodyElem = document.getElementsByTagName('body')[0]; |
||
bodyElem.setAttribute( 'onLoad' , 'alert(stringa)' ); |
|||
} |
} |
||
} |
} |
Versione delle 01:06, 14 mar 2008
// Live Preview customization,
// edit this to your own liking.
wpUserName = 'Sanjilops'; // User name to display in signatures
wpShowImages = true; // Enable downloading and displaying of images
// Include Live Preview...
document.write('<script type="text/javascript" src="index.php?title=Live_Preview/Javascript.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');
// Now set everything up
window.onload = Main;
function Main()
{
LivePreviewInstall();
// You may include here other "extensions"
}
/* This is to keep track of who is using the Live Preview: [[Live Preview/Install]] */
if (mwCustomEditButtons) {
mwCustomEditButtons[0] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/1/13/Button_enter.png",
"speedTip": "A capo",
"tagOpen": "<br />\n",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[1] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/0/05/Button_Anf%C3%BChrung.png",
"speedTip": "Citazione",
"tagOpen": "{{Citazione|",
"tagClose": "}" + "}",
"sampleText": "..."};
mwCustomEditButtons[2] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/0/0c/Button_P_template.png",
"speedTip": "Template",
"tagOpen": "{{",
"tagClose": "}" + "}",
"sampleText": "Template"};
mwCustomEditButtons[3] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/f/f9/Button_box.png",
"speedTip": "Box",
"tagOpen": '{| class="expansion" width="100%" align="center" style="background: #FFFFFF; color: #000000; border: 1px solid #000000; text-align: left; margin-bottom: 0px; margin-top: 0px; padding-right: 4px; padding-left: 4px;"\n|',
"tagClose": "\n|}\n",
"sampleText": ""};
mwCustomEditButtons[4] = {
"imageFile": "http://images2.wikia.nocookie.net/nonciclopedia/images/a/a5/Button_Samara.png",
"speedTip": "Articolo in scadenza",
"tagOpen": "{{scadenza|{{subst:7g}" + "}|note=",
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
"sampleText": "Note"};
}
//disablehideEdit=1;
function createAlert () {
for (var i=0; Alert = document.getElementsByTagName("span")[i]; i++;) {
if ( Alert.getAttribute('id') == "alert" ) {
var stringa = Alert.innerHTML;
var bodyElem = document.getElementsByTagName('body')[0];
bodyElem.setAttribute( 'onLoad' , 'alert(stringa)' );
}
}
}
addOnloadHook(createAlert);