MediaWiki:Gadget-RecentChangesRefresh.js: Difference between revisions

Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 26: Line 26:


function ajaxRC() {
function ajaxRC() {
$(appTo).append('&nbsp;<span style="position:absolute; margin-left:10px"><span style="font-family:sans-serif; font-size:xx-small; cursor:help" title="Automatically refresh the current page every ' + Math.floor(rcRefresh / 1000) + ' seconds">AUTO-REFRESH:</span><input type="checkbox" id="autoRefreshToggle" style="margin-left:5px"><span style="position:relative; left:5px" id="autoRefreshProgress"><img class="invert" src="' + 'https://pikmin.wiki.gallery/images/loader.gif" border="0" alt="AJAX operation in progress"/></span></span>');
$(appTo).append('&nbsp;<span style="position:absolute;margin-left:10px"><span style="font-family:sans-serif;font-size:xx-small;cursor:help" title="Automatically refresh the current page every ' + Math.floor(rcRefresh / 1000) + ' seconds">AUTO-REFRESH:</span><input type="checkbox" id="autoRefreshToggle" style="margin-left:5px"><span style="position:relative;left:5px" id="autoRefreshProgress"><img class="invert" src="' + 'https://pikmin.wiki.gallery/images/loader.gif" border="0" alt="AJAX operation in progress"/></span></span>');
$('#autoRefreshToggle').click(function () {
$('#autoRefreshToggle').click(function () {
setCookie('ajaxRC', $('#autoRefreshToggle').prop('checked') ? 'on' : 'off', 999);
setCookie('ajaxRC', $('#autoRefreshToggle').prop('checked') ? 'on' : 'off', 999);