Avoid some confusion with watching on edit by setting checkbox when ajax watch is...
authorAaron Schulz <aaron@users.mediawiki.org>
Sun, 3 Aug 2008 19:32:00 +0000 (19:32 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sun, 3 Aug 2008 19:32:00 +0000 (19:32 +0000)
skins/common/ajaxwatch.js

index d7c0625..c8d90b8 100644 (file)
@@ -101,6 +101,11 @@ wgAjaxWatch.processResult = function(request) {
        if(wgAjaxWatch.timeoutID) {
                window.clearTimeout(wgAjaxWatch.timeoutID);
        }
+       // Bug 12395 - avoid some watch link confusion on edit
+       var watchthis = document.getElementById("wpWatchthis");
+       if( watchthis && response.match(/^<[uw]#>/) ) {
+               watchthis.checked = response.match(/^<w#>/) ? "checked" : "";
+       }
        return;
 };