summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/functions.js b/functions.js
index 3b5e64f70..817946c39 100644
--- a/functions.js
+++ b/functions.js
@@ -1,7 +1,8 @@
var hotkeys_enabled = true;
function browser_has_opacity() {
- return navigator.userAgent.match("Gecko") || navigator.userAgent.match("Opera");
+ return navigator.userAgent.match("Gecko") != null ||
+ navigator.userAgent.match("Opera") != null;
}
function exception_error(location, e) {
@@ -1054,3 +1055,6 @@ function toggleSubmitNotEmpty(e, submit_id) {
}
}
+function isValidURL(s) {
+ return s.match("http://") != null || s.match("https://") != null;
+}