Put things in the right namespace

unstable
James Lee 2012-04-05 01:22:27 -06:00
parent 0ddfa79a34
commit 778fed9a19
2 changed files with 5 additions and 5 deletions

View File

@ -831,7 +831,7 @@ window.os_detect.searchVersion = function(needle, haystack) {
/* /*
* Return -1 if a < b, 0 if a == b, 1 if a > b * Return -1 if a < b, 0 if a == b, 1 if a > b
*/ */
window.os_detect.ua_ver_cmp = function(ver_a, ver_b) { window.ua_ver_cmp = function(ver_a, ver_b) {
// shortcut the easy case // shortcut the easy case
if (ver_a == ver_b) { if (ver_a == ver_b) {
return 0; return 0;
@ -875,15 +875,15 @@ window.os_detect.ua_ver_cmp = function(ver_a, ver_b) {
return 0; return 0;
} }
window.os_detect.ua_ver_lt = function(a, b) { window.ua_ver_lt = function(a, b) {
if (-1 == this.ua_ver_cmp(a,b)) { return true; } if (-1 == this.ua_ver_cmp(a,b)) { return true; }
return false; return false;
} }
window.os_detect.ua_ver_gt = function(a, b) { window.ua_ver_gt = function(a, b) {
if (1 == this.ua_ver_cmp(a,b)) { return true; } if (1 == this.ua_ver_cmp(a,b)) { return true; }
return false; return false;
} }
window.os_detect.ua_ver_eq = function(a, b) { window.ua_ver_eq = function(a, b) {
if (0 == this.ua_ver_cmp(a,b)) { return true; } if (0 == this.ua_ver_cmp(a,b)) { return true; }
return false; return false;
} }

View File

@ -29,7 +29,7 @@ class JavascriptOSDetect < JSObfu
def initialize(custom_js = '', opts = {}) def initialize(custom_js = '', opts = {})
@js = custom_js @js = custom_js
@js += File.read(File.join(File.dirname(__FILE__), "javascriptosdetect.js")) @js += ::File.read(::File.join(::File.dirname(__FILE__), "javascriptosdetect.js"))
super @js super @js