From: Aryeh Gregor Date: Sun, 14 Jan 2007 02:30:26 +0000 (+0000) Subject: (bug 8622) Clean up check for whether watch checkbox exists. Thanks to Brion for... X-Git-Tag: 1.31.0-rc.0~54420 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=0eeebf1d3a35e0dd6e08ea157a04c663a3fd0ea9;p=lhc%2Fweb%2Fwiklou.git (bug 8622) Clean up check for whether watch checkbox exists. Thanks to Brion for suggesting the path of sanity. --- 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]+']'; }