Content deleted Content added
-3.31 |
-3.32 |
||
Line 1:
/// User:PerfektesChaos/js/citoidWikitext/core.js
// Execute core functionality for citoid on wikitext source editing
/// 2017-06-
// ResourceLoader: compatible;
// dependencies: --
Line 17:
( function ( mw, $ ) {
"use strict";
var Version = -3.
MW_LIB = "citoidWikitext",
Sub = "core",
Line 82:
APIC.site = "https://citoid.wikimedia.org/api";
APIC.stateless = "/api/rest_v1/data/citation/mediawiki/";
Line 180:
// (APIC.fault)
// Remark: Used as event handler -- 'this' is not APIC
// 2017-06-
var f, i, query, service;
if ( typeof APIC.jq !== "object" ) {
Line 229:
break;
case "object":
if ( typeof query.beforeSend === "string"
&& query.beforeSend === "json" ) {
query.jq.beforeSend = f;
}
query.jq.beforeSend = f;
$.ajax( query.jq ).done( query.found )
Line 2,200 ⟶ 2,204:
// > GUIP.caret.selection
// > .bibRecord
// > APIC.stateless
// > APIC.found
// < TASK.query
Line 2,205 ⟶ 2,210:
// DESC.fire()
// GUIP.flat()
// APIC.worldCat.fire()
// .(project).favorite()
// GUIP.$flip()
Line 2,212 ⟶ 2,218:
// GUIP.input.filler()
// (APIC.fire)
// 2017-06-
var search = ( ask ? ask : GUIP.caret.selection ),
stateless = "|isbn|", // |oclc
i, k, m, project, q, suggest, url;
if ( ! search && CITWT.bibRecord ) {
Line 2,258 ⟶ 2,265:
}
GUIP.flat( "throbber", q.$links );
if ( typeof APIC.stateless === "string" &&
typeof q.scheme === "string" &&
stateless.indexOf( "|" + q.scheme + "|" ) >= 0 ) {
stateless = q[ q.scheme ];
if ( typeof stateless === "string" ) {
stateless = q.scheme.toUpperCase()
+ " " + stateless;
APIC.queries.push( stateless );
}
}
if ( typeof PROJ.favorite === "function" ) {
project = PROJ.favorite( q, APIC.found );
if ( project ) {
project.local = true;
APIC.queries.push( project );
}
|