From fc0d70ba1b9aba4c4a19d181f2cd913eaaf6bea4 Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Mon, 9 Dec 2013 20:23:48 +0100 Subject: [PATCH 1/2] try wrapping it all in an anonymous function --- uhr.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/uhr.js b/uhr.js index f957bb9..49208f4 100644 --- a/uhr.js +++ b/uhr.js @@ -17,6 +17,10 @@ along with this program. If not, see . * @param clockarea Das jQuery-gewrappte HTML-Element, auf dem die Uhr angezeigt werden soll. * @param themeElement Das HTML-Stylesheet-Tag, das das Theme-CSS referenziert. */ +(function() { +if (typeof Uhr == 'function') { + return; +} function Uhr(clockarea, settings) { this.id = Uhr.id++; this.timer = null; @@ -339,4 +343,4 @@ function m(letter) { } return l(letter, style); } - +})(); From 1ef8df63e32851110b04479e35d60bd1566082fe Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Mon, 9 Dec 2013 20:32:45 +0100 Subject: [PATCH 2/2] try it differently --- uhr.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/uhr.js b/uhr.js index 49208f4..3b09ed0 100644 --- a/uhr.js +++ b/uhr.js @@ -17,10 +17,7 @@ along with this program. If not, see . * @param clockarea Das jQuery-gewrappte HTML-Element, auf dem die Uhr angezeigt werden soll. * @param themeElement Das HTML-Stylesheet-Tag, das das Theme-CSS referenziert. */ -(function() { -if (typeof Uhr == 'function') { - return; -} +if (typeof Uhr === 'undefined') { function Uhr(clockarea, settings) { this.id = Uhr.id++; this.timer = null; @@ -343,4 +340,5 @@ function m(letter) { } return l(letter, style); } -})(); +} +