]> git.quilime.com - clmpr.git/commitdiff
base_dir in bookmarklet
authorGabriel Dunne <gdunne@quilime.com>
Sun, 18 Dec 2011 22:22:28 +0000 (14:22 -0800)
committerGabriel Dunne <gdunne@quilime.com>
Sun, 18 Dec 2011 22:22:28 +0000 (14:22 -0800)
bookmarklet.js
get.php

index 6ed8f4dd3212970d89bf39f5b04863dbe7d05160..6cc0f166e0b9c3b608de56e4c15b3b264a361bf1 100644 (file)
@@ -4,7 +4,7 @@
     b = document,
     c = encodeURIComponent,
     d = w.open(
-        'http://clmpr/new.php?'
+        'http://{BASE_URL}/new.php?'
         + 'url='  + c(b.location)
         + '&title=' + c(b.title || b.location)
     ,   'clmpr_popup'
diff --git a/get.php b/get.php
index e6aa1f7812be07967f3eea667cf6f95f075bd231..c37c600e0b663c44fe3b76fc03b4cc8996dc4b4a 100644 (file)
--- a/get.php
+++ b/get.php
@@ -72,6 +72,7 @@ case 'xml' :
 bookmarklet:
 <?php
     $js = file_get_contents('bookmarklet.js');
+    $js = str_replace('{BASE_URL}', BASE_URL, $js);
 ?>
 <a href="javascript:<?=$js?>">+</a>
 </p>