From 0eeebf1d3a35e0dd6e08ea157a04c663a3fd0ea9 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Sun, 14 Jan 2007 02:30:26 +0000 Subject: [PATCH] (bug 8622) Clean up check for whether watch checkbox exists. Thanks to Brion for suggesting the path of sanity. --- skins/common/wikibits.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index f46694029f..0ed1922464 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -596,6 +596,7 @@ function akeytt( doId ) { } // Now deal with evil deprecated ta + watchCheckboxExists = getElementById( 'wpWatchthis' ) ? true : false; for (var id in ta) { var n = document.getElementById(id); if (n) { @@ -612,8 +613,7 @@ function akeytt( doId ) { } // Don't add an accesskey for the watch tab if the watch // checkbox is also available. - if (a && ((id != 'ca-watch' && id != 'ca-unwatch') || - !(window.location.search.match(/[\?&](action=edit|action=submit)/i)))) { + if (a && ((id != 'ca-watch' && id != 'ca-unwatch') || !watchCheckboxExists)) { a.accessKey = ta[id][0]; ak = ' ['+tooltipAccessKeyPrefix+ta[id][0]+']'; } -- 2.20.1