From 7453ddfb9a6365724431899ad29cb6eb774c2dd0 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 3 Aug 2008 19:32:00 +0000 Subject: [PATCH] Avoid some confusion with watching on edit by setting checkbox when ajax watch is used (bug 12395). --- skins/common/ajaxwatch.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/skins/common/ajaxwatch.js b/skins/common/ajaxwatch.js index d7c06254c3..c8d90b8090 100644 --- a/skins/common/ajaxwatch.js +++ b/skins/common/ajaxwatch.js @@ -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(/^/) ? "checked" : ""; + } return; }; -- 2.20.1