From 605f7d463dc68eccc02c77f989302d7b9035b456 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 19 May 2006 04:10:58 +0100 Subject: fix url checking, param sanitizing in feed & cat editors, fix browser_has_opacity() --- functions.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'functions.js') 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; +} -- cgit v1.2.3