//<pre>
// Elenco dei tool da caricare. NB: La stringa deve iniziare e finire con uno spazio
var toLoad = "purg led ns0 lks orol tabs nav stru unw allp tbar avan cwtch popup nms cmd qed wed since goo ver vpop vfol";
var nomeBot="JaloBot";
if(typeof mbTrustedPages == 'undefined') mbTrustedPages = new Object();
mbTrustedPages['Utente:Salvatore_Ingala/Orfanizza'] = true;
//Lancia il vero monobook
// Vedi [[Wikipedia:Monobook.js/MonobookCompleto.js]]
//
document.writeln('<script type="text/javascript" src="/w/index.php?title=Wikipedia:Monobook.js/MonobookCompleto.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//JUST FOR DEBUG
//document.writeln('<script type="text/javascript" src="/w/index.php?title=Utente:Jalo/monobook.js/test&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//CONFIGURAZIONE POPUP
popupDelay = 2; // aspetta 2 secondi
popupRedlinkRemoval = true; // elimina i collegamenti a link rossi
popupQueriedRevertSummary = "Rollback da popup. Ripristinata la versione di $3";
popupRedlinkSummary = "Eliminato link rosso: %s";
popupOnEditSelection = false;
//Mostra i Tatoo
document.writeln('<script type="text/javascript" src="/w/index.php?title=Utente:Jalo/Tatoo&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//JUST FOR DEBUG
//document.writeln('<script type="text/javascript" src="/w/index.php?title=Utente:Jalo/Sandbox&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//TASTI PERSONALI
addLoadEvent( function ()
{
addToolbarButton('tb-firma', 'javascript:addTextAtCursor("~~~~","","",4)',
'http://upload.wikimedia.org/wikipedia/commons/d/d1/Button_mysignature.png', 'My sign', 'Jalo');
daInserire = "==Cronologia precedente alla pulizia dai copyviol==\n{{cassetto\n|titolo=cronologia\n|testo=<pre>\n</pre>}}";
addToolbarButton('tb-cass', 'javascript:addText(daInserire, "Cronologia pre-pulizia copyviol", 1)',
'http://upload.wikimedia.org/wikipedia/commons/c/cd/Button_vote_deletion.png', '[pre-copyviol]', 'Cronologia pre-copyviol');
});
//Speedy Google Search
addOnloadHook(function(){
var listener = function(e){
e = (e) ? e : ((window.event) ? window.event : null);
if(e && e.ctrlKey){
if(navigator.appName=='Microsoft Internet Explorer' && navigator.userAgent.indexOf("Opera")==-1) //IE
var t = document.selection.createRange().text;
else //Non-IE
var t = document.getSelection().toString();
t = t.replace(/^\s+/, '').replace(/\s+$/, ''); //trim
var q = t.indexOf('"') == -1 ? '"' : '';
if(t)
window.open("http://www.google.com/search?q=" + q + encodeURIComponent(t) + q);
}
}
if (window.addEventListener)
window.addEventListener('mouseup', listener, false); //Non-IE
else
document.onmouseup = listener; //IE
});
/*
var savefile = "d:\\mozdata.txt";
function save() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
} catch (e) {
alert("Permission to save file was denied.");
}
var file = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);
file.initWithPath( savefile );
if ( file.exists() == false ) {
alert( "Creating file... " );
file.create( Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 420 );
}
var outputStream = Components.classes["@mozilla.org/network/file-output-stream;1"]
.createInstance( Components.interfaces.nsIFileOutputStream );
*//* Open flags
#define PR_RDONLY 0x01
#define PR_WRONLY 0x02
#define PR_RDWR 0x04
#define PR_CREATE_FILE 0x08
#define PR_APPEND 0x10
#define PR_TRUNCATE 0x20
#define PR_SYNC 0x40
#define PR_EXCL 0x80
*/
/*
** File modes ....
**
** CAVEAT: 'mode' is currently only applicable on UNIX platforms.
** The 'mode' argument may be ignored by PR_Open on other platforms.
**
** 00400 Read by owner.
** 00200 Write by owner.
** 00100 Execute (search if a directory) by owner.
** 00040 Read by group.
** 00020 Write by group.
** 00010 Execute by group.
** 00004 Read by others.
** 00002 Write by others
** 00001 Execute by others.
**
*//*
outputStream.init( file, 0x04 | 0x08 | 0x20, 420, 0 );
// var output = document.getElementById('blog').value;
var output = "Testo di prova";
var result = outputStream.write( output, output.length );
outputStream.close();
}
function read() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
} catch (e) {
alert("Permission to read file was denied.");
}
var file = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);
file.initWithPath( savefile );
if ( file.exists() == false ) {
alert("File does not exist");
}
var is = Components.classes["@mozilla.org/network/file-input-stream;1"]
.createInstance( Components.interfaces.nsIFileInputStream );
is.init( file,0x01, 00004, null);
var sis = Components.classes["@mozilla.org/scriptableinputstream;1"]
.createInstance( Components.interfaces.nsIScriptableInputStream );
sis.init( is );
var output = sis.read( sis.available() );
document.getElementById('blog').value = output;
}
save();
*/
//</pre>
|