pub / rememori

Simple file-based bookmarking and notes application
git clone https://src.jayvii.de/pub/rememori.git
Home | Log | Files | Exports | Refs | README | RSS

bookmarklet.php (474B)


      1 <?php
      2 
      3 function bookmarklet() {
      4 
      5     /* construct javascript bookmarklet */
      6     echo "javascript:(function() {
      7 var category = prompt(
      8 '" . $GLOBALS["i18n_bookmarklet_prompt"] . "',
      9 'unknown'
     10 );
     11 if (category === null) { category = ''; }
     12 remori_window = window.open(
     13 'https://" . $_SERVER["SERVER_NAME"] . "/api/new.php
     14 ?category=' + category + '
     15 &return=html
     16 &content=' + window.location.href
     17 );
     18 setTimeout(() => { remori_window.close(); }, 3000);
     19 })();";
     20 
     21 } // function
     22 
     23 ?>