Content deleted Content added
-1.93 |
-1.94 |
||
Line 1:
/// Gadget-pageLinkHelper.js
// Some minor link helpers
/// 2015-01-
// ResourceLoader: compatible;
// dependencies: user, user.options, mediawiki.user, mediawiki.util
Line 13:
( function ( mw, $ ) {
"use strict";
var Version = -1.
Sign = "pageLinkHelper",
Signature = "ext.gadget." + Sign,
Line 42:
de: "Seite purgen" },
qqxTip: { en: "Reload"
+ " and show interface element IDs"
+ " und MediaWiki-IDs zeigen" },
qqxTitle: { en: "lang=qqx" },
translate: { "als" : "de",
Line 59 ⟶ 61:
"stq" : "de",
"vmf" : "de" }
}; //
Line 113 ⟶ 115:
// access -- distinguishing selector ID
// Uses:
// > Env.ltr
// > Sign
//
var space = "4px",
style = "#B0C4DE 1px solid",
Line 121 ⟶ 124:
"id": access } );
$r.css( { "border-bottom": style,
"border-left": style,▼
"background-color": "#FFFFFF",
"background": "rgba(255, 255, 255, 0.5)",
▲ "float": "right",
"font-family": "monospace",
"margin-bottom": "1em",
"margin-left": "1em",▼
"margin-top": space,
"padding-bottom": space,
"padding-right": space,
"padding-left": space } );
if ( Env.ltr ) {
"float": "right",
} else {
$r.css( { "border-right": style,
"float": "left",
"margin-right": "1em" } );
}
return $r;
} // $factory()
Line 148 ⟶ 157:
// > Sign
// >< Env
// 2015-01-
var r, // = undefined
sequence, suitable, $anchor, $clear;
if ( typeof Env.$corner === "undefined" ) {
Env.ltr = ( ! $( "body.sitedir-rtl" ).length );
Env.$corner = $( "<div>" );
Env.$corner.attr( { "class": Sign,
Line 188 ⟶ 198:
$anchor[ sequence ]( Env.$corner );
$clear = $( "<div>" );
$clear.css( { "clear": ( Env.ltr ? "left" : "right" ) } );
Env.$corner.after( $clear );
} else {
Line 554 ⟶ 564:
// freezer()
// (feed)
// 2015-01-
var link = false,
msec =
opt = OPTS.facet( "diff" ),
sign = Sign + "Difflink",
Line 698 ⟶ 708:
// Uses:
// mw.util.getParamValue()
// 2015-01-
var $results = $( "#mw-content-text li" ),
n = $results.length,
Line 711 ⟶ 721:
$a = $li.eq( j );
strip = $a.attr( "href" );
if
shift =
} else if ( alike ) {
} else {
shift = special + shift +
shift );
$a.attr( "href", strip );
}
}
}
Line 1,057 ⟶ 1,070:
// > Version
// < Env
// mw.user.options.
// mw.config.get()
// mw.util.getParamValue()
// forward()
// flip()
// mw.user.options.get()
// further()
// freeze()
Line 1,071 ⟶ 1,085:
// freshest()
// flat()
// 2015-01-
var linkUpdate;
mw.user.options.set( "gadget-" + Sign, Version );
Line 1,089 ⟶ 1,103:
case "Recentchanges" :
case "Watchlist" :
forward( 1 );
}
break;
case "Gadgets" :
|