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

Content deleted Content added
-4.4
-4.5
Line 1:
/// User:PerfektesChaos/js/lintHint/d.js
/// 2021-05-2526 PerfektesChaos@de.wikipedia
// Show LintErrors analysis live
// ResourceLoader: compatible;
Line 17:
( function ( mw, $ ) {
"use strict";
var Version = -4.45,
Signature = "lintHint",
HINT = { cmodels: { "wikitext": true,
Line 348:
// < HINT.launch
// < EDIT.live
// < BOXHINT.swiftselector
// < HINT.pub
// mw.loader.getState()
Line 359 ⟶ 360:
// (LINTER.first)
// (features)
// 20182021-0805-2426 PerfektesChaos@de.wikipedia
var i, listen, live, re, rls, s;
HINT.signature = "ext.gadget." + Signature;
Line 463 ⟶ 464:
}
if ( live ) {
HINT.selector = Signature.toLowerCase();
fair();
PREGO.fire();
Line 699 ⟶ 701:
// Uses:
// > HINT.live
// > Signature
// > HINT.ltr
// > BOX.bgc
Line 706 ⟶ 707:
// > GUIDER.live
// > PREGO.signature
// > HINT.selector
// > Signature
// >< BOX.$box
Line 714 ⟶ 716:
// (BOX.flip)
// (BOX.facet)
// 2021-0105-0126 PerfektesChaos@de.wikipedia
var $a, $e;
if ( HINT.live ) {
Line 740 ⟶ 742:
.css( { "float": ( HINT.ltr ? "left": "right" ) } );
BOX.$box.append( $e )
.addClass( SignatureHINT.selector + "-box" )
.attr( { id: SignatureHINT.selector,
role: "alert" } )
.css( { "background-color": "#" + BOX.bgc,
Line 749 ⟶ 751:
"color": "#" + BOX.fgc,
"margin-bottom": "1em",
"opacity": "12 !important",
"padding": "0.5em",
"pointer-events": "all" } );
Line 841 ⟶ 843:
// mediawiki.api.messages available
// Uses:
// > BOXHINT.$indicator
// > BOX.$collapsed
// > BOX.$null
Line 850 ⟶ 852:
// > HINT.nsn
// > PREGO.signature
// > HINT.selector
// >< BOX.$table
// >< BOX.$tbody
// >< BOX.swift
// >< API.Api
// >< BOX.$pagename
// < BOX.swift
// < BOX.$tbody
// BOX.factory()
// mw.hook()
Line 863 ⟶ 866:
// (BOX.filler)
// (API.fault)
// 2021-05-2526 PerfektesChaos@de.wikipedia
var i, req, $th, $thead, $tr;
BOX.factory( $area );
Line 915 ⟶ 918:
BOX.$tbody = $( "<tbody>" );
BOX.$table.addClass( "wikitable "
+ SignatureHINT.selector + "-table" )
.attr( { id: SignatureHINT.selector + "-table" } )
.append( $thead, BOX.$tbody )
.css( { "clear": "both" } );
Line 949 ⟶ 952:
// > mw.messages
// > HINT.later
// > SignatureHINT.selector
// > BOX.bgcErr
// > HINT.$textarea
Line 965 ⟶ 968:
// (BOX.find)
// (BOX.future)
// 20202021-0905-1926 PerfektesChaos@de.wikipedia
var n = 0,
e, i, k, par, s, $e, $e2, $e3, $td, $tr;
Line 983 ⟶ 986:
if ( s ) {
$tr = $( "<tr>" );
$tr.addClass( SignatureHINT.selector + "-" + e.type );
$td = $( "<td>" );
$td.css( { "background-color": "#" + BOX.bgcErr } );
Line 1,129 ⟶ 1,132:
// > API.single
// > HINT.launched
// > HINT.selector
// > Signature
// > BOX.bgcOk
// > BOX.fgc
// > HINT.$indicator
// > GUIDER.live
// > Version
Line 1,142 ⟶ 1,147:
// GUIDER.from()
// BOX.focus()
// 2021-05-2526 PerfektesChaos@de.wikipedia
if ( $area && ! HINT.$page ) {
HINT.$page = $area;
Line 1,174 ⟶ 1,179:
face();
BOX.$null = $( "<div>" );
BOX.$null.addClass( Signature[ HINT.selector + "-null" ),
.attr( { id: Signature HINT.selector + "-nullfine" }] )
.attr( { titleid: HINT.selector + Version"-null" } )
.css( { "background-color": "#" + BOX.bgcOk,
"clear": "both",
"color": "#" + BOX.fgc,
"float": ( HINT.ltr ? "right"
: "left" ),
"font-size": "smaller",
"padding": "3px" } )
Line 1,204 ⟶ 1,208:
// > GUIDER.live
// > Version
// > SignatureHINT.selector
// > HINT.ltr
// > BOX.bgc
// > BOX.fgc
// > Signature
// > EDIT.live
// > API.errors
Line 1,218 ⟶ 1,223:
// EDIT.fine()
// (BOX.full)
// 2021-05-2526 PerfektesChaos@de.wikipedia
if ( $area && ! HINT.$page ) {
HINT.$page = $area;
Line 1,226 ⟶ 1,231:
if ( ! GUIDER.live ) {
if ( BOX.$collapsed ) {
BOX.$collapsed.attr( { disabled: false, } )
title: Version } )
.show();
} else {
BOX.$collapsed = $( "<div>" );
BOX.$collapsed.addClass( SignatureHINT.selector + "-collapsed" )
.attr( { id: SignatureHINT.selector + "-collapsed",
role: "button", } )
title: Version } )
.click( BOX.full )
.css( { /* "clear": ( HINT.ltr
Line 1,240 ⟶ 1,243:
"left" ), */
"cursor": "pointer",
"floatpadding-left": ( HINT.ltr"2px",
"padding-right": ? "right2px",
"padding-top": : "left2px" ),
"padding": "2px",
"pointer-events": "all" } )
.text( Signature );
Line 1,250 ⟶ 1,252:
BOX.$collapsed.css( { "background-color": "#" + BOX.bgc,
"color": "#" + BOX.fgc,
"opacity": "12 !important" } );
.removeClass( HINT.selector + "-fine" )
.attr( { title: Version } );
}
if ( EDIT.live && ! API.errors ) {
Line 1,270 ⟶ 1,274:
// Uses:
// > HINT.indicators
// > SignatureHINT.selector
// > HINT.$page
// >< HINT.$indicator
// >< BOX.$top
// 2021-05-2526 PerfektesChaos@de.wikipedia
var learn, light, s, $e;
$apply.addClass( "noprint" );
Line 1,299 ⟶ 1,303:
HINT.$indicator.append( $apply );
light = true;
} else {
$apply.css( { "float": ( HINT.ltr ? "right"
"float": ( HINT.ltr ? : "rightleft" ) } );
}
}
Line 1,305 ⟶ 1,312:
BOX.$top = $( "<div>" );
BOX.$top.addClass( "noprint "
+ SignatureHINT.selector + "-top" )
.attr( { id: SignatureHINT.selector + "-top" } )
.css( { "clear": "both",
"width": "100%" } );
Line 1,349 ⟶ 1,356:
// EDIT.fire()
// API.full()
// 20202021-0905-2026 PerfektesChaos@de.wikipedia
var idRev;
if ( HINT.live ) {
Line 1,369 ⟶ 1,376:
.css( { "background-color": "#" + BOX.bgcRun,
"color": "#" + BOX.fgcRun,
"opacity": "12 !important" }
);
}
Line 1,399 ⟶ 1,406:
// Uses:
// > HINT.texts.other
// > SignatureHINT.selector
// > BOX.$box
// >< PREGO.app
// < BOX.$other
// PREGO.app.translation()
// 2021-0105-0126 PerfektesChaos@de.wikipedia
var $e;
if ( application ) {
Line 1,417 ⟶ 1,424:
.html( PREGO.app.translation( HINT.texts.other ) );
BOX.$other = $( "<div>" );
BOX.$other.addClass( SignatureHINT.selector + "-future" )
.attr( { id: SignatureHINT.selector + "-future" } )
.css( { "clear": "both",
"padding-bottom": "1em",
Line 1,523 ⟶ 1,530:
// Uses:
// > EDIT.$source
// > HINT.selector
// > BOX.bgcOk
// > BOX.$collapsed
// < EDIT.listen
// (EDIT.focus)
// 2021-05-2526 PerfektesChaos@de.wikipedia
if ( EDIT.$source ) {
EDIT.listen = true;
EDIT.$source.focusin( EDIT.focus );
BOX.$collapsed.attraddClass( {HINT.selector title:+ "+-fine" } )
.attr( { title: "padding+": } "2px",)
.css( { "background-color": "#" + BOX.bgcOk,
"opacity": "12 !important" } );
}
}; // EDIT.fine()
Line 1,574 ⟶ 1,583:
// > BOX.bgc
// > BOX.$collapsed
// > HINT.selector
// > Version
// >< EDIT.listen
// 20202021-0905-2026 PerfektesChaos@de.wikipedia
if ( EDIT.listen ) {
BOX.$collapsed.css( { "background-color": "#" + BOX.bgc,
"opacity": "12 !important" } );
.removeClass( HINT.selector + "-fine" )
.attr( { title: Version } );
EDIT.listen = false;
}
Line 1,991 ⟶ 2,004:
// > HINT.using
// > PREGO.signature
// > HINT.selector
// < HINT.$page
// < GUIDER.$doc
Line 2,007 ⟶ 2,021:
// (GUIDER.foreign)
// (GUIDER.facet)
// 2021-0105-0126 PerfektesChaos@de.wikipedia
var $v = $( "head" ),
$e = $v.find( "title" );
Line 2,079 ⟶ 2,093:
HINT.$page.append( GUIDER.$formText, GUIDER.$formPage );
GUIDER.$pagename = $( "<div>" );
GUIDER.$pagename.addClass( Signature[ HINT.selector + "-pagename" ),
.attr( { id: Signature HINT.selector + "-pagenamefine" }] )
.attr( { id: HINT.selector + "-pagename" } )
.css( { "background-color": "#" + BOX.bgcOk,
"float": ( HINT.ltr ? "left"
: "right" ),
"margin-bottom": "1em",
"opacity": "12 !important",
"padding": "4px",
"pointer-events": "all" } )