Content deleted Content added
-2.8 |
-2.81 |
||
Line 1:
/// User:PerfektesChaos/js/lintHint/d.js
// Show LintErrors analysis live
/// 2018-05-
// ResourceLoader: compatible;
// dependencies: user, mw.API
Line 17:
( function ( mw, $ ) {
"use strict";
var Version = -2.
Signature = "lintHint",
HINT = { cmodels: { "wikitext": true,
Line 93:
"mediawiki.ui.input" ],
$pagename: false },
LINTER = { live: false },
PREGO = { app: false,
live: false,
Line 294:
// < HINT.nsn
// < PREGO.live
// < HINT.source
// < HINT.idRev
Line 310 ⟶ 311:
// mw.hook()
// (features)
// 2018-05-
var i, listen, live, re, s;
HINT.signature = "ext.gadget." + Signature;
Line 340 ⟶ 341:
break;
case "LintErrors":
LINTER.live = true;
PREGO.fire();
fair( LINTER.first );
break;
Line 703 ⟶ 706:
// (API.fine)
// (API.fault)
// 2018-05-
var idRev = actual,
subject = access;
Line 711 ⟶ 714:
} else {
if ( ! API.single ) {
API.single = mw.config.get( "
}
subject = API.single;
Line 1,341 ⟶ 1,344:
// < HINT.$textarea
// API.full()
// 2018-05-
var source;
if ( HINT.live ) {
Line 1,363 ⟶ 1,366:
}
if ( ! API.single && ! GUIDER.live ) {
API.single = mw.config.get( "
}
if ( EDIT.live ) {
Line 1,467 ⟶ 1,470:
LINTER.fire = function (
// Uses:▼
// mw.hook()▼
LINTER.live = true;
}; // LINTER.fire()
LINTER.first = function () {▼
// LintErrors page loading
// Precondition:▼
// jquery.tablesorter available▼
// > LINTER.live
// mw.config.get()
// fair()
// (LINTER.fire)
// 2018-05-07 PerfektesChaos@de.wikipedia
&& ! LINTER.live ) {
fair( LINTER.fire );
}
}; // LINTER.first()
LINTER.form = function ( $area ) {
// LintErrors page has been loaded
// Precondition:
Line 1,500 ⟶ 1,534:
}
}
}; // LINTER.
▲ LINTER.first = function () {
▲ // LintErrors page loading
▲ // Precondition:
▲ // jquery.tablesorter available
▲ // Uses:
▲ // mw.config.get()
▲ // mw.hook()
▲ // (LINTER.fire)
▲ // 2017-08-03 PerfektesChaos@de.wikipedia
▲ if ( mw.config.get( "wgTitle" ).indexOf( "/" ) > 0 ) {
▲ mw.hook( "wikipage.content" ).add( LINTER.fire );
▲ }
▲ }; // LINTER.first()
Line 1,865 ⟶ 1,883:
// (GUIDER.foreign)
// (GUIDER.facet)
// 2018-05-
var $v = $( "head" ),
$e = $v.find( "title" );
Line 1,920 ⟶ 1,938:
GUIDER.$rev = $( "<input>" );
GUIDER.$rev.addClass( "mw-ui-input" )
.attr( { disabled: true,
size: 8,
type: "text" } )
.css( { "display": "inline-block",
"margin-left": "1.5em",
Line 1,961 ⟶ 1,981:
// > PREGO.live
// >< HINT.live
// >< LINTER.live
// PREGO.form()
// LINTER.first()
// mw.loader.using()
// (BOX.feed)
// 2018-05-
var i, n, s, v, vals;
if ( typeof applied === "object"
Line 1,981 ⟶ 2,004:
if ( PREGO.live ) {
PREGO.form();
} else if ( LINTER.live ) {
LINTER.live = false;
LINTER.first();
} else {
if ( HINT.spaces ) {
|