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

Content deleted Content added
-3.6
-3.7
Line 1:
/// User:PerfektesChaos/js/lintHint/d.js
/// 20182019-0901-0319 PerfektesChaos@de.wikipedia
// Show LintErrors analysis live
// ResourceLoader: compatible;
Line 17:
( function ( mw, $ ) {
"use strict";
var Version = -3.67,
Signature = "lintHint",
HINT = { cmodels: { "wikitext": true,
Line 103:
[ "later", "boolean" ],
[ "launch", "boolean" ],
// [ "layer", "boolean" ],
[ "lazy", "boolean" ],
[ "spaces", "string" ] ],
Line 118:
 
HINT.texts = {
// 20182019-0501-0819 PerfektesChaos@de.wikipedia
"desc": {"en": "Show LintErrors analysis live.",
"de": "Zeige LintErrors-Analyse live.",
Line 175:
+ " piuttosto che avviandola manualmente "
+ " tramite bottone."},
/*
"^^layer": {"en": "Convert all source edit links on"
+ " LintErrors special page"
Line 186 ⟶ 187:
+ " nello"
+ " strumento di modifica ParserMigration."},
*/
"^^lazy": {"en": "Suppress small label if no error detected.",
"de": "Unterdrücke das kleine grüne Feld,"
Line 262 ⟶ 264:
// (API.full)
// (BOX.feed)
// 20182019-0501-0719 PerfektesChaos@de.wikipedia
var i, live;
if ( typeof apply === "object"
Line 290 ⟶ 292:
HINT.launch = apply.launch;
}
/*
if ( typeof apply.layer === "boolean" ) {
HINT.layer = apply.layer;
}
*/
if ( typeof apply.lazy === "boolean" ) {
HINT.lazy = apply.lazy;
Line 676 ⟶ 680:
// > HINT.ltr
// >
// 2018-0509-0225 PerfektesChaos@de.wikipedia
if ( $activate ) {
$activate.css( { "floatdisplay": ( HINT.ltr ? "rightblock": "left" ) } );,
"float": ( HINT.ltr ? "right": "left" ) } );
BOX.$box.append( $activate );
}
Line 743 ⟶ 748:
$e.click( BOX.flip )
.css( { "color": "#FF0000",
"display": "block",
"float": ( HINT.ltr ? "right": "left" ),
"font-weight": "bolder" } )
Line 1,194 ⟶ 1,200:
// EDIT.fine()
// (BOX.full)
// 20172018-0809-0825 PerfektesChaos@de.wikipedia
if ( $area && ! HINT.$page ) {
HINT.$page = $area;
Line 1,207 ⟶ 1,213:
BOX.$collapsed.attr( { id: Signature + "-collapsed" } )
.click( BOX.full )
.css( { /* "clear": ( HINT.ltr ? "right": "left" ),
"float": ( HINT.ltr ? "right": "left" ), */
"margin-bottomdisplay": "3pxblock",
"paddingfloat": ( HINT.ltr ? "2pxright" } ):
"left" ),
"margin-bottom": "3px",
"padding": "2px" } )
.text( Signature );
if ( ! GUIDER.live ) {
Line 1,237 ⟶ 1,246:
// > HINT.$page
// >< BOX.$top
// 20172018-0809-0826 PerfektesChaos@de.wikipedia
var learn = ( ! BOX.$e;top ),
if ( ! BOX. $top ) {e;
if ( learn ) {
BOX.$top = $( "<div>" );
BOX.$top.attr( { id: Signature + "-top" } )
Line 1,249 ⟶ 1,259:
}
BOX.$top.prepend( $apply );
if ( learn &&
window.document.___location.hash ) {
window.document.___location = window.document.___location.href;
}
}; // BOX.focus()
 
Line 1,358 ⟶ 1,372:
CODMIRROR.first = function () {
// Check whether CodeMirror is activated
// Postcondition:
// Returns something, if present
// Uses:
// > window.CodeMirror
Line 1,532 ⟶ 1,548:
// < LINTER.subst
// (LINTER.further)
// 20182019-0501-0219 PerfektesChaos@de.wikipedia
var $table = $area.find( ".TablePager" );
if ( $table.length ) {
Line 1,538 ⟶ 1,554:
$table.tablesorter();
}
/*
if ( typeof HINT.layer === "boolean" ) {
if ( HINT.layer ) {
Line 1,554 ⟶ 1,571:
$table.find( "a" ).each( LINTER.further );
}
*/
}
}; // LINTER.form()
Line 1,559 ⟶ 1,577:
 
 
/*
LINTER.further = function ( any, a ) {
// Divert LintErrors page link
Line 1,575 ⟶ 1,594:
}
}; // LINTER.further()
*/
 
 
Line 1,812 ⟶ 1,832:
// (GUIDER.filled)
// (GUIDER.finish)
// 2018-0509-0225 PerfektesChaos@de.wikipedia
var submit = mw.message( "go" ).text(),
$b = $( "<span>" ),
Line 1,830 ⟶ 1,850:
.attr( { type: "reset" } )
.click( GUIDER.flat )
.css( { "display": "block",
"float": ( HINT.ltr ? "right": "left" ) } );
GUIDER.$formText.append( $b );
$div.css( { "clear": "both" } );
Line 2,002 ⟶ 2,023:
// Uses:
// > PREGO.pars
// > PREGO.signature
// > Signature
// > HINT.nsn
// > HINT.using
Line 2,007 ⟶ 2,030:
// >< HINT.live
// >< LINTER.live
// mw.hook()
// PREGO.form()
// LINTER.first()
// mw.loader.using()
// (BOX.feed)
// 20182019-0501-0719 PerfektesChaos@de.wikipedia
var i, n, s, v, vals;
if ( typeof applied === "object"
Line 2,023 ⟶ 2,047:
}
} // for i
if ( typeof applied.layer === "boolean" ) {
delete applied.layer;
mw.hook( PREGO.signature + ".forward" ).fire( Signature,
applied );
}
}
if ( HINT.spaces ) {
Line 2,091 ⟶ 2,120:
// Uses:
// > PREGO.$spaces
// >< REPOSPREGO.reNum
// >< REPOSPREGO.rooms
// >< REPOSPREGO.follow
// 2018-05-02 PerfektesChaos@de.wikipedia
var s = PREGO.$spaces.val(),
Line 2,135 ⟶ 2,164:
PREGO.field = function ( $applying ) {
// Namespaces text input field has been generated
// Precondition:
// $applying -- jQuery object of text input field
// Uses:
// < PREGO.$spaces
Line 2,173 ⟶ 2,204:
// mw.hook()
// (PREGO.fiat)
// 20182019-0501-0219 PerfektesChaos@de.wikipedia
var support = ".wikipedia.org/wiki/" + HINT.doc.substr( 3 ),
docs = { "en": "//en" + support,
Line 2,195 ⟶ 2,226:
type: "checkbox",
show: HINT.texts[ "^^lazy" ],
val: HINT.lazy },
/*
,
{ signature: "layer",
type: "checkbox",
show: HINT.texts[ "^^layer" ],
val: HINT.layer }
*/
];
dialog = { script: Signature,