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

Content deleted Content added
-3.7
-4.3
 
(4 intermediate revisions by the same user not shown)
Line 1:
/// User:PerfektesChaos/js/citoidWikitext/core.js
// Execute core functionality for citoid on wikitext source editing
/// 2018-0709-2103 PerfektesChaos@de.wikipedia
// ResourceLoader: compatible;
// dependencies: --
Line 17:
( function ( mw, $ ) {
"use strict";
var Version = -34.73,
Signature = "citoidWikitext",
Sub = "core",
Line 64:
// mw.loader.state()
// mw.hook()
// 20162018-0108-0224 PerfektesChaos@de.wikipedia
var sign = "ext.gadget." + Signature,
sub = "/" + Sub,
signature = sign + sub,
e, s, o; = mw.loader.getState( signature ),
e, o, }rls;
if ( mw.loader.getState( signature ) !== "ready" ) {
if ( s mw.loader.state(!== signature,"loaded" && s !== "ready" ); {
CITWT.suiterls = "r"{ };
// rls[ ><signature .core.] = "loaded";
mw.loader.state( rls );
if ( typeof mw.libs[ Signature ] !== "object" ||
! mw.libs[ Signature ] ) {
Line 82 ⟶ 85:
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 ⟶ 102:
}
} // for s in XPORT
if ( mw.loader.getState( rls[ signature )] !== "ready" ) {;
mw.loader.state( rls );
mw.hook( CITWT.type + sub + ".ready" ).fire();
}
Line 1,209 ⟶ 1,215:
// GUIP.btn.portlet()
// (GUIP.btn.wikiEditor)
// 20152018-0508-1424 PerfektesChaos@de.wikipedia
if ( ! this.wikEd() ) {
if ( GUIP.opts.usebetatoolbar ) {
GUIP.submit = "wikiEditor ... (loading)";
mw.loader.using( [ "ext.wikiEditor.toolbar" ],
this.wikiEditor );
} else if ( GUIP.opts.showtoolbar ) {
Line 2,132 ⟶ 2,138:
// mw.loader.state()
// REPOS.fire()
// 2018-0709-0603 PerfektesChaos@de.wikipedia
var ssign = "ext.gadget." + PREGO.signature;,
rls;
if ( ! mw.loader.getState( ssign ) ) {
mw.loader.state(rls s,= "loading"{ )};
rls[ sign ] = "loading";
mw.loader.state( rls );
REPOS.fire( PREGO.site,
PREGO.store + PREGO.signature + PREGO.sub,
Line 2,532 ⟶ 2,541:
// 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-0709-2103 PerfektesChaos@de.wikipedia
var p, rls;
if ( ! mw.loader.getState( assigned ) ) {
mw.loader.state(rls assigned,= "loading"{ )};
rls[ assigned ] = "loading";
mw.loader.state( rls );
if ( address ) {
mw.loader.load( address );
} 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 ⟶ 2,575:
// > .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,743:
// > Version
// > .signature
// >< .core.loaded
// >< .bibRecord
// < .support
Line 2,751 ⟶ 2,754:
// 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",
Line 2,793 ⟶ 2,795:
fire();
}( window.mediaWiki, window.jQuery ) );
 
/// EOF </nowiki> citoidWikitext/core/d.js