summaryrefslogtreecommitdiff
path: root/js/common.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/common.js')
-rw-r--r--js/common.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/common.js b/js/common.js
index a400a17..9843c59 100644
--- a/js/common.js
+++ b/js/common.js
@@ -1,3 +1,12 @@
+$.urlParam = function(name){
+ try {
+ var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
+ return decodeURIComponent(results[1].replace(/\+/g, " ")) || 0;
+ } catch (e) {
+ return 0;
+ }
+}
+
function offline_remove(id, callback) {
if (confirm("Remove download?")) {