* (bug 4001) Use local variables properly in wikibits.js akeytt()
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 12 Dec 2005 00:25:44 +0000 (00:25 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 12 Dec 2005 00:25:44 +0000 (00:25 +0000)
RELEASE-NOTES
skins/common/wikibits.js

index baf14d0..94c6f95 100644 (file)
@@ -310,6 +310,7 @@ fully support the editing toolbar, but was found to be too confusing.
 * (bug 4233) Update LanguageJa.php
 * Fix regression: old version missing from edit links in Nostalgia skin
 * (bug 1600) Trigger edit conflict on duplicate section=new submissions
+* (bug 4001) Use local variables properly in wikibits.js akeytt()
 
 
 === Caveats ===
index bdbea38..46bc4db 100644 (file)
@@ -413,16 +413,18 @@ function insertTags(tagOpen, tagClose, sampleText) {
 function akeytt() {
        if (typeof ta == "undefined" || !ta)
                return;
-       pref = 'alt-';
+       var pref = 'alt-';
        if (is_safari || navigator.userAgent.toLowerCase().indexOf('mac') + 1
                || navigator.userAgent.toLowerCase().indexOf('konqueror') + 1 )
                pref = 'control-';
        if (is_opera)
                pref = 'shift-esc-';
 
-       for (id in ta) {
-               n = document.getElementById(id);
+       for (var id in ta) {
+               var n = document.getElementById(id);
                if (n) {
+                       var a = null;
+                       var ak = '';
                        // Are we putting accesskey in it
                        if (ta[id][0].length > 0) {
                                // Is this object a object? If not assume it's the next child.