Content deleted Content added
2.1 |
2.2 |
||
(One intermediate revision by the same user not shown) | |||
Line 1:
/// User:PerfektesChaos/js/autoBackup/r.js
///
/// Fingerprint:#0#
/// @license
///<nowiki>
(function(mw,$){
"use strict";
var VERSION=2.
if(typeof mw.libs[BAK]!=="object"||!mw.libs[BAK]){
mw.libs[BAK]={};}
Line 20:
BAK.opt={};}
BAK.cnf.text={
"BAKself":{"en":"AutoBackup",
"de":"AutoBackup"}, "IntJSONparse":{"en":"Internal ERROR -- JSON.parse",
"de":"Interner FEHLER -- JSON.parse"}, "NoLSavail":{"en":"No localStorage available",
"de":"Kein localStorage zugreifbar"}, "otherPages":{"en":"Other Pages",
"de":"Andere Seiten"}, "pending":{"en":"Recover from pending abort?",
"de":"Wiederherstellung nach Abbruch?"}, "setItemExcept":{"en":"ERROR setting localStorage",
"de":"FEHLER beim Setzen im localStorage"}, "thisPage":{"en":"this page",
"de":"diese Seite"}, "VanishedLS":{"en":"ERROR: localStorage vanished",
"de":"FEHLER: localStorage verschwunden"}, "WriteCrash":{"en":"Crash on localStorage write attempt",
"de":"Schreibversuch auf localStorage versagt"} };
BAK.cnf.translang={
"de":"de",
"de-at":"de", "de-ch":"de",
"de-formal":"de", "als":"de",
"bar":"de", "dsb":"de",
"frr":"de", "gsw":"de",
"hsb":"de", "ksh":"de",
"lb":"de", "nds":"de",
"pdc":"de", "pdt":"de",
"pfl":"de", "sli":"de",
"stq":"de", "vmf":"de"
};
Line 154 ⟶ 172:
this.$top=$("#content");
if(!this.$top.length){
this.$top=
this.$top.before(this.$div);}}}
if(apply){
Line 185 ⟶ 203:
this.$editform=false;
this.$textarea=false;
$form=
if($form){
$ta=
if($ta.length){
r=$ta.val();}
Line 493 ⟶ 511:
};
BAK.find=function(){
var q=new mw.Api(),w={action:"query",
"continue":"", pageids:this.pageID,prop:"revisions",rvlimit:3,rvuser:mw.util.wikiUrlencode(mw.config.get("wgUserName")) };
if(this.later){
delete w.pageids;
Line 509 ⟶ 529:
this.find();}}
if(typeof mw.user==="object"){
if(mw.user.options&&mw.user.options.get("uselivepreview")){
this.livePreview=true;
$(mw).bind("LivePreviewDone",this.fresh);
this.gui.leading=true;
mw.hook("wikipage.content").add(this.fresh
};
BAK.fixed=function(apply){
Line 665 ⟶ 684:
mw.hook("wikipage.content").add(BAK.firing);}}}
};
BAK.firing=function($all){
BAK.$page=$all;
switch(BAK.start){
case "submit":
|