summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-05-19 04:10:58 +0100
committerAndrew Dolgov <[email protected]>2006-05-19 04:10:58 +0100
commit605f7d463dc68eccc02c77f989302d7b9035b456 (patch)
treefab10dabb99f901cd9a1444195220e6ca731a1f1 /functions.js
parentcaa53a7cb1fb1a52daf561209ea4aaceb4578bfc (diff)
fix url checking, param sanitizing in feed & cat editors, fix browser_has_opacity()
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;
+}