Content deleted Content added
-0.01 |
-0.02 |
||
Line 1:
/// User:PerfektesChaos/js/refNames/core/d.js
/// 2022-07-
// <ref name="..."> major work
// ResourceLoader: compatible;
Line 19:
( function ( mw, $ ) {
"use strict";
var Version = -0.
Signature = "refNames",
THIS = { lapsus: false,
Line 78:
".limitreport" ],
locked: true,
pics: {
+ "-destructive.svg" ],
drop: [ "9b", "OOjs_UI_icon_trash"
+ "-invert.svg" ],
exch: [ "e9", "OOjs_UI_icon_reload"
+ "-invert.svg" ],
Line 534 ⟶ 536:
k = after + 1;
break;
} // switch flat()
} // for k
}
Line 1,285 ⟶ 1,287:
// > SOURCE.locked
// > PARSER.lock
// > SOURCE.grouped
// > VIEW.offered
Line 1,291 ⟶ 1,292:
// > THIS.selProblem
// > SOURCE.pics.edit
// > SOURCE.pics.
// >< SOURCE.groups
// < SOURCE.lock
// fruit()
Line 1,299 ⟶ 1,301:
// (SOURCE.further)
// (SOURCE.flip)
// (SOURCE.
// 2022-07-
var css = { "display": "inline-block",
"margin-left": "1em",
"margin-right": "1em" },
n = SOURCE.groups.length,
e, group, i, k, o, s, $head, $img, $item, $li, $ul;
if ( ! adjust ) {
Line 1,311 ⟶ 1,314:
SOURCE.lock = false;
}
SOURCE.groups.sort();
if ( ! SOURCE.groups[ n - 1 ] ) {
SOURCE.groups.pop();
SOURCE.groups.unshift( false );
}
}
for ( i = 0; i < n; i++ ) {
s = SOURCE.groups[ i ];
group = SOURCE.grouped[ s ];
for ( k = 0; k < group.length; k++ ) {
e = group[ k ];
if ( e.lone ) {
PARSER.lock = true;
}
} // for k
} // for i
for ( i = 0; i < n; i++ ) {
s = SOURCE.groups[ i ];
group = SOURCE.grouped[ s ];
Line 1,369 ⟶ 1,389:
$li.append( $item );
if ( ! e.linked ) {
$img = $file( SOURCE.pics.
$item = $( "<span>" );
$item.append( $img )
Line 1,375 ⟶ 1,395:
"role": "button",
"title": "discard" } )
.click( [ $li, e, s, $item, css ],
SOURCE.flopping )
.css( css )
.css( { "cursor": "pointer" } );
Line 1,443 ⟶ 1,464:
}
}; // SOURCE.first()
SOURCE.flash = function ( about ) {
// Removing requested
// Precondition:
// about -- Event object, with Array .data[ 6 ]
// Uses:
// > VIEW.offered
// < SOURCE.lock
// PARSER.fire()
// 2022-07-01 PerfektesChaos@de.wikipedia
var $li = about.data[ 0 ],
pre = about.data[ 1 ],
group = about.data[ 2 ],
$drag = about.data[ 3 ],
$drop = about.data[ 5 ];
$drop.remove();
if ( PARSER.fire( false,
{ group: group,
seek: pre.name,
shift: false } ) ) {
if ( typeof VIEW.offered[ pre.name ] === "object" ) {
delete VIEW.offered[ pre.name ];
}
pre.name = false;
$li.remove();
} else {
$drag.show();
}
SOURCE.lock = false;
}; // SOURCE.flash()
Line 1,498 ⟶ 1,551:
SOURCE.flop = function ( about ) {
//
// Precondition:
// about -- Event object, with Array
// Uses:
// > SOURCE.lock
// (SOURCE.flash)
// 2022-07-01 PerfektesChaos@de.wikipedia
var $drop;
if ( SOURCE.lock ) {
$drop = about[ 5 ];
$drop.click( about, SOURCE.flash )
.css( { "background-color": "#FF0000",
"cursor": "pointer" } );
}
}; // SOURCE.flop()
SOURCE.flopped = function ( about ) {
// Abort removal
// Precondition:
// about -- Event object, with Array .data[ 6 ]
// Uses:
// >< SOURCE.lock
// 2022-07-01 PerfektesChaos@de.wikipedia
var
if ( SOURCE.lock ) {
$drag = about.data[ 3 ];
$drop = about.data[ 5 ];
if ( $drop ) {
$drop.remove();
}
if ( $drag ) {
$drag.show();
}
SOURCE.lock = false;
}
}; // SOURCE.flopped()
SOURCE.flopping = function ( about ) {
// Preparing removal
// Precondition:
// about -- Event object, with Array .data[ 5 ]
// Uses:
// > SOURCE.pics.drop
// > THIS.selector
// >< SOURCE.lock
// (SOURCE.flop)
// (SOURCE.flopped)
// 2022-07-01 PerfektesChaos@de.wikipedia
var css, discard, e, s, $drag, $img, $drop, $li;
if ( ! SOURCE.lock ) {
SOURCE.lock = true;
$li = about.data[ 0 ];
$
$drag.focus()
$img = $file( SOURCE.pics.drop,
$drop
discard = [ $li, e, s,
$drop.addClass( THIS.selector +
"title": "discard" } )
.css( css )
.css( { "background-color": "#FFB0B0",
"border-color": "transparent",
"border-radius": "2px",
"border-style": "solid",
"border-width": "2px",
"cursor": "none",
"transition": "background-color 2s" } )
.focusout( discard, SOURCE.flopped )
.mouseout( discard, SOURCE.flopped );
$li.append( $drop );
$drop.focus();
window.setTimeout( SOURCE.flop, 1500, discard );
}
}; // SOURCE.
|