Vai al contenuto

Utente:Alex brollo/Hotkeys.js

'A Wikisource.

Notarella: Aroppo pubbreca putisse necessità 'e pulezzà 'a caché d' 'o navigatóre pe vedé 'e cagnamienti.

  • Firefox / Safari: Sprémme 'o buttóne maiuscole e ffà clic ncopp'a Recarreca, o pure spremme Ctrl-F5 o Ctrl-R (⌘-R ncopp'a Mac)
  • Google Chrome: spremme Ctrl-Shift-R (⌘-Shift-R ncopp'a nu Mac)
  • Internet Explorer/edge: Spremme 'o buttóne Ctrl pe' tramente ca faie click ncopp'a Refresh, o pure spremmere Ctrl-F5
  • Opera: Vaje addò 'o Menu → Mpustaziune (Opera → Mpustaziune ncopp' 'o Mac) e po' ncopp'a Privacy & sicurezza → Pulezza date d' 'o browser → Immaggene e file d' 'a cache.
mw.salva3=function () {
	$(".quality3 input").click();
	$("#wpSave").click();
};

mw.salva0=function () {
	$(".quality0 input").click();
	$("#wpSave").click();
};

mw.salva4=function() {
	$(".quality4 input").click();
	$("#wpSave").click();
};
indentSelection = function() {
    t = selection();
    if (t[0].indexOf("\n") === -1) {
        t[1] = t[0] + t[1];
        t[0] = "";
    } else {
        pn = t[0].lastIndexOf("\n");
        t[1] = t[0].substring(pn + 1) + t[1];
        t[0] = t[0].substring(0, pn + 1);
    }
    var t1 = t[1].split("\n");
    for (var i = 0; i < t1.length; i += 1) {
        t1[i] = "     " + t1[i];
    }
    t[1] = t1.join("\n");
    scriviBox(t.join(""));
};
deIndentSelection = function() {
    t = selection();
    if (t[0].indexOf("\n") === -1) {
        t[1] = t[0] + t[1];
        t[0] = "";
    } else {
        pn = t[0].lastIndexOf("\n");
        t[1] = t[0].substring(pn + 1) + t[1];
        t[0] = t[0].substring(0, pn + 1);
    }
    var t1 = t[1].split("\n");
    for (var i = 0; i < t1.length; i += 1) {
        for (j = 0; j < 5; j += 1) {
            if (t1[i].substring(0, 1) === " ")
                t1[i] = t1[i].substring(1);
            else
                break;
        }
    }
    t[1] = t1.join("\n");
    scriviBox(t.join(""));
}
;

autoFix=function(){
	postOCR();
	autoRh();
	mw.memoRegexRun();
};

mw.shortcut.add("Alt+shift+0",mw.salva0);
mw.shortcut.add("Alt+shift+3",mw.salva3);
mw.shortcut.add("Alt+shift+4",mw.salva4);
mw.shortcut.add("Alt+Right",indentSelection);
mw.shortcut.add("Alt+Left",deIndentSelection);
mw.shortcut.add("Alt+7",autoFix);