MediaWiki:Common.js: Difference between revisions
no edit summary
(Added auto-refreshing recent changes code) |
No edit summary |
||
Line 33: | Line 33: | ||
function ajaxRC() { | function ajaxRC() { | ||
appTo = $(".firstHeading"); | appTo = $(".firstHeading"); | ||
appTo.append(' <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(' <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") |