In this article, we will delve into the fascinating world of
User:DannyS712/ExpandHistory.js, exploring its multiple facets and aspects that make it a topic of relevance and interest today. From its impact on society to its influence in the cultural sphere,
User:DannyS712/ExpandHistory.js has captured the attention of experts and fans alike, generating debates, reflections and in-depth analysis. Along these lines, we will closely examine the different aspects of this topic, offering a detailed look that will allow the reader to better understand its importance and implications in the contemporary world.
// Install the newest version with:
// <code><nowiki> {{subst:Iusc|User:DannyS712/ExpandHistory.js}} </nowiki></code>
// or with
// <code><nowiki> importScript( 'User:DannyS712/ExpandHistory.js' ); // Backlink: ] </nowiki></code>
//
// If forking this script, please note my contributions / give me credit
$(function (){
var ExpandHistory_config = {
name: ']',
version: 1.0,
debug: false
};
mw.loader.using( 'mediawiki.util', function () {
$(document).ready( function () {
var action = mw.config.get('wgAction');
if (action && action === 'history'){
ExpandHistory();
}
} );
} );
function ExpandHistory(){
var links = $('a:textEquals("500")');
var thousand;
if (ExpandHistory_config.debug) console.log( links );
links.each( function() {
thousand = $(this).clone();
thousand.href = thousand.href.replace(/limit=500/, 'limit=1000');
thousand.textContent = '1000';
thousand = thousand;
this.after( thousand );
this.after( ' | ' );
});
}
// Attribution: copied from https://stackoverflow.com/questions/6673777/select-link-by-text-exact-match#
$.expr.textEquals = function(a, i, m) {
return $(a).text().match("^" + m + "$");
};
});