< User:Bradv
Browse history interactively ← Previous edit Content deleted Content addedInline
Revision as of 22:54, 20 December 2020 view source Bradv (talk | contribs )Edit filter managers , Autopatrolled , Checkusers , Oversighters , Administrators 37,875 edits leave bottom nav buttons up until you hit the button← Previous edit
Latest revision as of 20:03, 27 May 2022 view source Enterprisey (talk | contribs )Edit filter managers , Autopatrolled , Administrators 34,926 edits incredibly minor bugfix per User:Asartea
Line 21:
Line 21:
'class': 'mw-ui-button mw-ui-progressive'})
'class': 'mw-ui-button mw-ui-progressive'})
.text('Load more')
.text('Load more')
.insertAfter($('.mw-contributions-list'))
.insertAfter($('.mw-pager -body '))
.click(function () {
.click(function () {
$('body').addClass('endlesscontribs');
$('body').addClass('endlesscontribs');
Latest revision as of 20:03, 27 May 2022
(function( $, mw ) {
'use strict';
if (mw.config.get('wgCanonicalSpecialPageName')==='Contributions') {
mw.loader.using("mediawiki.util").then(function () {
const css = mw.util.addCSS(`
body.endlesscontribs .mw-pager-navigation-bar:not(:first-of-type) {
display: none;
}
#endlesscontribs {
margin: 1em;
}
`)
var nexturl = $('a').attr('href');
if (nexturl) {
var loading = false;
const button = $('<span>', {
'id': 'endlesscontribs',
'class': 'mw-ui-button mw-ui-progressive'})
.text('Load more')
.insertAfter($('.mw-pager-body'))
.click(function () {
$('body').addClass('endlesscontribs');
if (!loading) {
loading = true;
$.get(nexturl, function(data) {
var $html = $(data);
const $ul = $('.mw-contributions-list');
const $newul = $html.find('.mw-contributions-list > li');
$newul.each(function (index, element) {
$ul.append($(element));
})
nexturl = $html.find('a').attr('href');
if (!nexturl) {
button.remove();
}
loading = false;
})
}
});
}
});
}
}(jQuery, mediaWiki ));
User:Bradv/endlesscontribs.js: Difference between revisions
Add topic
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.
**DISCLAIMER** We are not affiliated with Wikipedia, and Cloudflare.
The information presented on this site is for general informational purposes only and does not constitute medical advice.
You should always have a personal consultation with a healthcare professional before making changes to your diet, medication, or exercise routine.
AI helps with the correspondence in our chat.
We participate in an affiliate program. If you buy something through a link, we may earn a commission 💕
↑