Content deleted Content added
-2.2 |
-2.3 |
||
Line 1:
/// User:PerfektesChaos/js/citoidWikitext/core.js
// Execute core functionality for citoid on wikitext source editing
/// 2016-
// ResourceLoader: compatible;
// dependencies: --
Line 17:
( function ( mw, $ ) {
"use strict";
var VERSION = -2.
MW_LIB = "citoidWikitext",
Sub = "core",
Line 259:
/*
BOOK.countries978 = [
[ "bg", 954 ],
Line 292 ⟶ 293:
[ "zh", 7 ]
]; // BOOK.countries978 2015-05-01
*/
Line 306 ⟶ 308:
// > BOOK.catalogs
// BOOK.furnish()
// 2016-03-25 PerfektesChaos@de.wikipedia
/*
// 2015-05-01 PerfektesChaos@de.wikipedia
var r = [ ],
Line 323 ⟶ 327:
}
return r;
*/
return CITWT.isbnLib.finder( assign );
}; // BOOK.finder()
BOOK.fire = function () {
// Initialize ISBN support
// Uses:
// mw.hook()
// (BOOK.first)
// 2016-03-21 PerfektesChaos@de.wikipedia
mw.hook( "isbnLib.ready" ).add( BOOK.first );
}; // BOOK.fire()
BOOK.first = function ( application ) {
// Uses:
// Precondition:
// application -- isbnLib
// Uses:
// < .isbnLib
// .isbnLib.furnish()
// GUIP.fire()
// 2016-03-25 PerfektesChaos@de.wikipedia
CITWT.isbnLib = application;
switch ( typeof CITWT.isbn ) {
case "string":
case "object":
CITWT.isbnLib.furnish( CITWT.isbn );
} // switch typeof CITWT.isbn
GUIP.fire();
}; // BOOK.first()
Line 337 ⟶ 374:
// this
// > BOOK.countries978
// 2016-03-25 PerfektesChaos@de.wikipedia
/*
// 2015-05-01 PerfektesChaos@de.wikipedia
var r = false,
Line 398 ⟶ 437:
}
return r;
*/
return CITWT.isbnLib.focus( analyse );
}; // BOOK.focus()
/*
BOOK.furnish = function () {
// Build set of library catalogs, including user defined
Line 464 ⟶ 506:
} // user defined
}; // BOOK.furnish()
*/
Line 832 ⟶ 875:
if ( /^[0-9]+X?$/.test( r.isbn ) ) {
r.lang = BOOK.focus( r.isbn );
r.url = true;
}
break;
Line 2,291 ⟶ 2,334:
// mw.user.options.get()
// mw.loader.using()
//
// (
//
if ( typeof CITWT[ CITWT.core.site ] === "object" ) {
PROJ = CITWT[ CITWT.core.site ];
Line 2,303 ⟶ 2,346:
// race condition
mw.loader.using( [ "ext.wikiEditor" ],
} else {
}
}
Line 2,516 ⟶ 2,559:
// Load current project plug-in, if appropriate
// Postcondition:
// Returns something, if plug-in
// Uses:
// > .signature
Line 2,678 ⟶ 2,721:
// mw.loader.using()
// (TASK.fire)
// 2016-
var suitable = "|edit|submit|",
env, maxage, sub;
facilitated();
if ( typeof CITWT.core.loaded !== "boolean" ) {
Line 2,693 ⟶ 2,736:
env.wgPageContentModel === "wikitext" &&
UTIL.friend() ) {
if ( VERSION > 0 ) {
maxage = 604800;
sub = "r";
} else {
maxage = 1000;
sub = "d";
}
UTIL.feed( "ext.gadget.preferencesGadgetOptions",
"preferencesGadgetOptions/
604811 );
UTIL.fetch( "opus" );
UTIL.feed( "user:PerfektesChaos/WikiSyntaxTextMod/S",
"WikiSyntaxTextMod/" + sub + "S",
maxage );
UTIL.feed( "user:PerfektesChaos/WikiSyntaxTextMod/U",
"WikiSyntaxTextMod/" + sub + "U",
maxage );
if ( typeof CITWT.bibRecord !== "object" ) {
CITWT.bibRecord = false;
|