From cd12dcad1a482ea805f8dcc58b364e9c6cddc667 Mon Sep 17 00:00:00 2001 From: Adrian Lang <lang@cosmocode.de> Date: Tue, 2 Feb 2010 16:20:17 +0100 Subject: [PATCH] JavaScript syntax fixes --- lib/scripts/events.js | 8 ++++---- lib/scripts/helpers.js | 4 ++-- lib/scripts/textselection.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/scripts/events.js b/lib/scripts/events.js index 2ea619085..df46cc1cf 100644 --- a/lib/scripts/events.js +++ b/lib/scripts/events.js @@ -107,8 +107,8 @@ window.fireoninit = function() { } // for Internet Explorer (using conditional comments) - /*@cc_on @*/ - /*@if (@_win32) + /*@cc_on + @if (@_win32) document.write("<scr" + "ipt id=\"__ie_init\" defer=\"true\" src=\"//:\"><\/script>"); var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { @@ -116,7 +116,7 @@ window.fireoninit = function() { window.fireoninit(); // call the onload handler } }; - /*@end @*/ + @end @*/ // for Safari if (/WebKit/i.test(navigator.userAgent)) { // sniff @@ -176,5 +176,5 @@ function bind (fnc) { var args = Array.prototype.slice.call(arguments, 1); return function() { return fnc.apply(this, args); - } + }; } diff --git a/lib/scripts/helpers.js b/lib/scripts/helpers.js index 8d4f3ea78..129964d29 100644 --- a/lib/scripts/helpers.js +++ b/lib/scripts/helpers.js @@ -109,7 +109,7 @@ function isEmpty (prop /* :Object */) /* :Boolean */ { if (isRegExp(prop) && new RegExp("").toString() == prop.toString()) return true; if (isString(prop) || isNumber(prop)) return !prop; if (Boolean(prop)&&false != prop) { - for (var i in prop) if(prop.hasOwnProperty(i)) return false + for (var i in prop) if(prop.hasOwnProperty(i)) return false; } return true; } @@ -124,7 +124,7 @@ function isEmpty (prop /* :Object */) /* :Boolean */ { if ('undefined' == typeof Object.hasOwnProperty) { Object.prototype.hasOwnProperty = function (prop) { return !('undefined' == typeof this[prop] || this.constructor && this.constructor.prototype[prop] && this[prop] === this.constructor.prototype[prop]); - } + }; } /** diff --git a/lib/scripts/textselection.js b/lib/scripts/textselection.js index 76cc6bcbb..5e4602f85 100644 --- a/lib/scripts/textselection.js +++ b/lib/scripts/textselection.js @@ -24,7 +24,7 @@ function selection_class(){ this.getText = function(){ if(!this.obj) return ''; return this.obj.value.substring(this.start,this.end); - } + }; } /** -- GitLab