Browse Source

get bookmarklet base url from config

pull/5/head
Aaron Parecki 7 years ago
parent
commit
37c516216e
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      lib/config.template.php
  2. +1
    -1
      views/partials/bookmark-bookmarklet.php

+ 1
- 0
lib/config.template.php View File

@ -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';

+ 1
- 1
views/partials/bookmark-bookmarklet.php View File

@ -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