Content deleted Content added
-2.01 + tidy-font-bug |
-2.11 |
||
Line 1:
/// User:PerfektesChaos/js/lintHint/d.js
// Show LintErrors analysis live
/// 2017-11-
// ResourceLoader: compatible;
// dependencies: user, mw.API
Line 17:
( function ( mw, $ ) {
"use strict";
var Version = -2.
Signature = "lintHint",
HINT = { doc: "en:User:PerfektesChaos/js/" + Signature,
Line 41:
launch: false,
launched: false,
layer: false,
lazy: false,
live: false,
Line 156 ⟶ 157:
// > HINT.launched
// >< HINT.launch
// >< HINT.layer
// >< HINT.live
// < HINT.later
Line 163 ⟶ 165:
// (API.feed)
// (BOX.feed)
// 2017-
var i, live;
if ( typeof apply === "object"
Line 188 ⟶ 190:
if ( typeof apply.launch === "boolean" ) {
HINT.launch = apply.launch;
}
if ( typeof apply.layer === "boolean" ) {
HINT.layer = apply.layer;
}
if ( typeof apply.lazy === "boolean" ) {
Line 243 ⟶ 248:
// (features)
// (BOX.feed)
// 2017-
var listen, live, re, s;
HINT.signature = "ext.gadget." + Signature;
Line 294 ⟶ 299:
case "edit":
case "submit":
case "parsermigration-edit":
EDIT.live = true;
HINT.nsn = mw.config.get( "wgNamespaceNumber" );
Line 823 ⟶ 829:
// (BOX.find)
// (BOX.future)
// 2017-
var n = 0,
e, i, k, par, s, $e, $e2, $e3, $td, $tr;
Line 1,261 ⟶ 1,267:
// Precondition:
// $area -- mw-content-text
// Uses:
// 2017-08-08 PerfektesChaos@de.wikipedia▼
// > HINT.layer
// < LINTER.reEdit
// (LINTER.further)
var $table = $area.find( ".TablePager" );
if ( $table.length )
if ( typeof $table.tablesorter === "function" ) {
$table.tablesorter();
}
if ( HINT.layer ) {
LINTER.reEdit = new RegExp( "([?&]action=)" +
"edit" +
"(&.+)?$" );
$table.find( "a" ).each( LINTER.further );
}
}
}; // LINTER.fire()
Line 1,284 ⟶ 1,301:
}
}; // LINTER.first()
LINTER.further = function ( any, a ) {
// Divert LintErrors page link
// Precondition:
// any -- number of link in table
// a -- DOM object of <a>
// Uses:
// > LINTER.reEdit
// 2017-11-11 PerfektesChaos@de.wikipedia
var $a = $( a ),
s = $a.attr( "href" );
if ( s.indexOf( "action=edit" ) > 0 ) {
$a.attr( "href",
s.replace( LINTER.reEdit,
"$1parsermigration-edit$2" ) );
}
}; // LINTER.further()
|