User:PerfektesChaos/js/citoidWikitext/core/d.js: Difference between revisions

Content deleted Content added
-3.7
-3.8
Line 1:
/// User:PerfektesChaos/js/citoidWikitext/core.js
// Execute core functionality for citoid on wikitext source editing
/// 2018-07-2128 PerfektesChaos@de.wikipedia
// ResourceLoader: compatible;
// dependencies: --
Line 17:
( function ( mw, $ ) {
"use strict";
var Version = -3.78,
Signature = "citoidWikitext",
Sub = "core",
Line 64:
// mw.loader.state()
// mw.hook()
// 20162018-0107-0228 PerfektesChaos@de.wikipedia
var sign = "ext.gadget." + Signature,
sub = "/" + Sub,
signature = sign + sub,
e, s, o; = mw.loader.getState( signature ),
e, }o;
if ( mw.loader.getState( signature ) !== "ready" ) {
if ( s mw.loader.state(!== signature,"loaded" && s !== "ready" ); {
mw.loader.state( signature, "loaded" );
if ( typeof mw.libs[ Signature ] !== "object" ||
! mw.libs[ Signature ] ) {
Line 82 ⟶ 83:
CITWT.vsn = "";
}
CITWT.vsn = CITWT.vsn + Sub.substr( 0, 1 ) + ":" + Version;
CITWT.type = Signature;
CITWT.suite = ( Version > 1 ? "r" : "d" );
if ( typeof CITWT[ Sub ] !== "object" ||
! CITWT[ Sub ] ) {
Line 98 ⟶ 100:
}
} // for s in XPORT
if ( mw.loader.getStatestate( signature ) !== , "ready" ) {;
mw.hook( CITWT.type + sub + ".ready" ).fire();
}
Line 2,532 ⟶ 2,535:
// address -- URL to be used, else created from access
// Uses:
// > Version.suite
// >< REPOS.suitemaxage
// mw.loader.getState()
// mw.loader.state()
// mw.loader.load()
// REPOS.fire()
// 2018-07-2128 PerfektesChaos@de.wikipedia
var p;
if ( ! mw.loader.getState( assigned ) ) {
Line 2,546 ⟶ 2,549:
} else {
p = { bcache: 1 };
if ( typeof CITWT.suite !== "string" ) {
CITWT.suite = ( Version > 1 ? "r" : "d" );
}
p.maxage = ( CITWT.suite === "r" ? REPOS.maxage : 100 );
REPOS.fire( REPOS.site,
Line 2,567:
// > .signature
// > .type
// > Version.suite
// >< .suite
// UTIL.feed()
// 2018-07-1428 PerfektesChaos@de.wikipedia
var sub = "/" + access;
if ( typeof CITWT.suite !== "string" ) {
CITWT.suite = "r";
}
UTIL.feed( CITWT.signature + sub,
CITWT.type + sub + "/" + CITWT.suite );
Line 2,739 ⟶ 2,735:
// > Version
// > .signature
// >< .core.loaded
// >< .bibRecord
// < .support
Line 2,751 ⟶ 2,746:
// mw.loader.using()
// (TASK.fire)
// 2018-07-2228 PerfektesChaos@de.wikipedia
var env, sub, suitable;
facilitated();
if ( CITWT && typeof CITWT.core.loaded !== "boolean" ) {
CITWT.core.loaded = true;
env = mw.config.get( [ "wgAction",
"wgDBname",