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

Content deleted Content added
-1.1
-1.2
Line 1:
/// User:PerfektesChaos/js/lintHint/d.js
// Show LintErrors analysis live
/// 2017-08-1819 PerfektesChaos@de.wikipedia
// ResourceLoader: compatible;
// dependencies: user, mw.API
Line 17:
( function ( mw, $ ) {
"use strict";
var Version = -1.12,
Signature = "lintHint",
HINT = { doc: "en:User:PerfektesChaos/js/" + Signature,
Line 108:
// >< HINT.$body
// < HINT.ltr
// 2017-08-0119 PerfektesChaos@de.wikipedia
if ( ! HINT.$body ) {
HINT.$body = $( "body" );
HINT.ltr = ( !$( HINT"html" ).$body.hasClassattr( "rtldir" ) !== "rtl" );
}
} // face()
Line 232:
// (features)
// (BOX.feed)
// 2017-08-0819 PerfektesChaos@de.wikipedia
var listen, live, re, s;
HINT.signature = "ext.gadget." + Signature;
if ( mw.loader.getState( HINT.signature ) !== "ready" ) {
Line 249:
GUIDER.first();
}
listen = true;
break;
case "LintErrors":
Line 292 ⟶ 293:
if ( live ) {
s = mw.config.get( "wgPageContentModel" );
live = ( s === "wikitext" );
listen = live;
}
if ( listen ) {
mw.hook( Signature + ".config" ).add( features );
}
if ( live ) {
fair();
mw.hook( Signature + ".config" ).add( features );
if ( HINT.live ) {
mw.loader.using( HINT.using, BOX.feed );
Line 1,459 ⟶ 1,463:
// mw.loader.using()
// (GUIDER.foreign)
// 2017-08-0719 PerfektesChaos@de.wikipedia
var $v = $( "head" ),
$e = $v.find( "title" );
Line 1,469 ⟶ 1,473:
HINT.$page.empty();
face();
$v = HINT.$body.find( "#firstHeading,#section_0" ).text( Signature );
if ( ! $v.length ) {
$v = $( "h1" );
}
$v.eq( 0 ).text( Signature );
$v = $( "<div>" );
$v.css( { "clear": "both" } );