Browse Source

get bookmarklet base url from config

pull/5/head
Aaron Parecki 10 years ago
parent
commit
37c516216e
  1. 1
      lib/config.template.php
  2. 2
      views/partials/bookmark-bookmarklet.php

1
lib/config.template.php

@ -1,6 +1,7 @@
<?php
class Config {
public static $hostname = 'quill.dev';
public static $base_url = 'http://quill.dev/';
public static $gaid = '';
public static $dbHost = '127.0.0.1';

2
views/partials/bookmark-bookmarklet.php

@ -1,5 +1,5 @@
javascript:(function(){
var t;try{t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));}catch(e){t="";};
window.location="http://quill.dev/bookmark?url="+encodeURIComponent(window.location.href)+"&content="+encodeURIComponent('"'+t+'"')+"&name="+encodeURIComponent(document.title)+"&token=<?= $this->token ?>";
window.location="<?= Config::$base_url ?>bookmark?url="+encodeURIComponent(window.location.href)+"&content="+encodeURIComponent('"'+t+'"')+"&name="+encodeURIComponent(document.title)+"&token=<?= $this->token ?>";
})();
Loading…
Cancel
Save