Information for "MediaWiki:Gadget-cs.js"
From Tardis Wiki, the free Doctor Who reference
Display title | MediaWiki:Gadget-cs.js |
Default sort key | Gadget-cs.js |
Page length (in bytes) | 2,155 |
Namespace | MediaWiki |
Page ID | 386275 |
Page content language | en - English |
Page content model | JavaScript |
Indexing by robots | Disallowed |
Number of redirects to this page | 1 |
Number of subpages of this page | 0 (0 redirects; 0 non-redirects) |
Edit | Allow only users with "editsitejs" permission (infinite) |
Move | Allow only users with "editsitejs" permission (infinite) |
View the protection log for this page.
Page creator | Bongolium500 (talk | contribs) |
Date of page creation | 21:20, 7 April 2024 |
Latest editor | Bongolium500 (talk | contribs) |
Date of latest edit | 22:08, 9 April 2024 |
Total number of edits | 53 |
Total number of distinct authors | 1 |
Recent number of edits (within past 90 days) | 0 |
Recent number of distinct authors | 0 |
Hidden category (1) | This page is a member of a hidden category:
|
Transcluded templates (10) | Templates used on this page:
|
Description | Content |
Article description: (description ) This attribute controls the content of the description and og:description elements. | mw.hook('wikipage.content').add(function(){
$('.cse').each(function(i, obj) {
$(obj).attr("aria-hidden","true");
var citeID = $(obj).attr('id');
var citeIDNum = citeID.slice(23); //get number at end of ID
var toggle = $(".mw-customtoggle-cs" + citeIDNum);
$(toggle).attr("aria-controls",citeID);
$(toggle).attr("title","Show " + $(toggle).attr("title").slice(7).replace('"', '\\"'));
$(toggle).attr("aria-label",$(toggle).attr("title"));
});
});
$(".cse").on("afterExpand.mw-collapsible", function() {
$(this).attr("aria-hidden","false");
var citeIDNum = $(this).attr('id').slice(23); //get number at end of ID
var toggle = $(".mw-customtoggle-cs" + citeIDNum);
$(toggle).attr("aria-expanded","true");
$(toggle).attr("title","Hide " + $(toggle).attr("title").slice(5).replace('"', '\\"'));
$(toggle).attr("aria-label",$(toggle).attr("title"));
if ($($(this).children(".csl")).length) {
var csLoader = $(this).children(".csl")[0];
var json = $(csLoader).children(".csd")[0].innerHTML;
var storedText = sessionStorage.getItem('CS-' + json);
if (storedText != null) {
csLoader.innerHTML = storedText;
$(csLoader).removeClass("csl");
} else {
var params = {
action: 'parse',
text: 'Lua error: mw.text.jsonDecode: Syntax error.',
format: 'json',
useskin: 'timeless',
mobileformat: 'false'
};
var api = new mw.Api();
api.get(params).done(function(data) {
var response = $(data.parse.text['*']);
var citationText = $($(response).children("section")[0]).children("p")[0].innerHTML;
csLoader.innerHTML = citationText;
$(csLoader).removeClass("csl");
sessionStorage.setItem('CS-' + json, citationText);
});
}
}
});
$(".cse").on("afterCollapse.mw-collapsible", function() {
$(this).attr("aria-hidden","true");
var citeIDNum = $(this).attr('id').slice(23); //get number at end of ID
var toggle = $(".mw-customtoggle-cs" + citeIDNum);
$(toggle).attr("aria-expanded","false");
$(toggle).attr("title","Show " + $(toggle).attr("title").slice(5).replace('"', '\\"'));
$(toggle).attr("aria-label",$(toggle).attr("title"));
}); |
Information from
Extension:WikiSEO