User:PerfektesChaos/js/lintHint/d.js: Difference between revisions

Content deleted Content added
-2.13
-2.14
Line 1:
/// User:PerfektesChaos/js/lintHint/d.js
// Show LintErrors analysis live
/// 2018-0102-2107 PerfektesChaos@de.wikipedia
// ResourceLoader: compatible;
// dependencies: user, mw.API
/// Fingerprint: #0#0#
Line 17:
( function ( mw, $ ) {
"use strict";
var Version = -2.1314,
Signature = "lintHint",
HINT = { cmodels: { "wikitext": -99true,
"proofread-index": 104true,
"proofread-page": 102true },
doc: "en:User:PerfektesChaos/js/" + Signature,
errors: [ "bogus-image-options",
Line 257:
// (features)
// (BOX.feed)
// 2018-0102-2107 PerfektesChaos@de.wikipedia
var listen, live, re, s;
HINT.signature = "ext.gadget." + Signature;
Line 281:
} // switch wgCanonicalSpecialPageName
break;
case 102: // s:Page:
case 104: // s:Index:
case break;106:
case 108:
case 110:
case 112:
// might be Wikisource
s = mw.config.get( "wgPageContentModel" );
if ( typeof HINT.cmodels[ s ] === "numberboolean" ) {
HINT.source = s;
break;
}
// fall through
default:
HINT.idRev = mw.config.get( "wgRevisionId" );
Line 318 ⟶ 323:
HINT.using.push( "jquery.textSelection" );
live = true;
if ( HINT.nsn ==>= 104100 ) {
s = mw.config.get( "wgPageContentModel" );
if ( s === "proofread-page" ) {
Line 471 ⟶ 476:
// (API.fed)
// (API.fault)
// 2018-0102-2107 PerfektesChaos@de.wikipedia
var id, q, s, w;
if ( typeof arrived === "object" &&
Line 482 ⟶ 487:
q = q.revisions[ 0 ];
if ( typeof q.contentmodel !== "string" ||
typeof HINT.cmodels[ q.contentmodel ] === "numberboolean"
) {
s = q[ "*" ];
Line 1,202 ⟶ 1,207:
case "wikitext":
case "proofread-page":
source = "#wpTextbox1";
break;
} // switch HINT.source