You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
644 B

  1. <?= $this->facebook_id ? partial('partials/fb-script') : '' ?>
  2. console.log("Favoriting URL: <?= $this->url ?>");
  3. var star = document.createElement('img');
  4. star.id="quill-star";
  5. star.src="http://quill.dev/images/<?= $this->like_url ? 'star' : 'red-x' ?>.svg";
  6. document.body.appendChild(star);
  7. var css = document.createElement('link');
  8. css.rel="stylesheet";
  9. css.type="text/css";
  10. css.href="http://quill.dev/css/favorite.css";
  11. document.body.appendChild(css);
  12. setTimeout(function(){
  13. document.getElementById('quill-star').classList.add('hidden');
  14. var el = document.getElementById('quill-star');
  15. el.parentNode.removeChild(el);
  16. }, 1200);