From 01cbe6454bb17001f416f7d13b802158ae6dd68f Mon Sep 17 00:00:00 2001 From: Rotem Liss Date: Tue, 10 Jun 2008 18:55:32 +0000 Subject: [PATCH] Avoid some of the strict JS warnings in Firefox. --- skins/common/mwsuggest.js | 8 +++++--- skins/common/wikibits.js | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/skins/common/mwsuggest.js b/skins/common/mwsuggest.js index d7d03f944d..52470060ff 100644 --- a/skins/common/mwsuggest.js +++ b/skins/common/mwsuggest.js @@ -96,14 +96,16 @@ function os_encodeQuery(value){ if(escape) { return escape(value); } + return null; } function os_decodeValue(value){ if (decodeURIComponent) { return decodeURIComponent(value); - } + } if(unescape){ return unescape(value); } + return null; } /** Brower-dependent functions to find window inner size, and scroll status */ @@ -452,7 +454,7 @@ function os_updateSearchQuery(r,newText){ /** Find event target */ function os_getTarget(e){ - if (!e) var e = window.event; + if (!e) e = window.event; if (e.target) return e.target; else if (e.srcElement) return e.srcElement; else return null; @@ -525,7 +527,7 @@ function os_eventKeypress(e){ /** Catch the key code (Firefox bug) */ function os_eventKeydown(e){ - if (!e) var e = window.event; + if (!e) e = window.event; var targ = os_getTarget(e); var r = os_map[targ.id]; if(r == null) diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 2982607857..802b595078 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -58,7 +58,7 @@ function importScript(page) { var loadedScripts = {}; // included-scripts tracker function importScriptURI(url) { if (loadedScripts[url]) { - return; + return null; } loadedScripts[url] = true; var s = document.createElement('script'); -- 2.20.1