Site Notice
Due to recent vandalism, all edits performed by IPs and new users will be reviewed before being published. This means it might take some time for your edit to show up.
New accounts also have to be confirmed before being created.
If you have any questions, contact one of the staff members on their talk page, or on the Discord server.

MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
(Added auto-refreshing recent changes code)
No edit summary
Line 33: Line 33:
function ajaxRC() {
function ajaxRC() {
appTo = $(".firstHeading");
appTo = $(".firstHeading");
appTo.append('&nbsp;<span style="position:absolute; margin-left:10px;"><span style="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"><span style="position:relative; top:5px; left:5px;" id="autoRefreshProgress"><img src="/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-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"><span style="position:relative; top:5px; left:5px;" id="autoRefreshProgress"><img src="/w/images/loader.gif" border="0" alt="AJAX operation in progress" /></span></span>');
$("#autoRefreshToggle").click(function () {
$("#autoRefreshToggle").click(function () {
setCookie("ajaxRC", $("#autoRefreshToggle").is(":checked") ? "on" : "off")
setCookie("ajaxRC", $("#autoRefreshToggle").is(":checked") ? "on" : "off")