]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Add Note bookmarklet #580 881/head
authorphilipp-r <philipp-r@users.noreply.github.com>
Mon, 27 Mar 2017 12:01:06 +0000 (14:01 +0200)
committerArthurHoaro <arthur@hoa.ro>
Thu, 25 May 2017 13:34:26 +0000 (15:34 +0200)
tpl/default/tools.html
tpl/vintage/tools.html

index baa033aff7cb0b22cbaed714b2b04f99fd17052f..6951ad28b6a8d29c4d8edbccff3f7730926d81c4 100644 (file)
     <div class="tools-item">
       <a title="{'Drag this link to your bookmarks toolbar or right-click it and Bookmark This Link'|t},
                 {'Then click ✚Add Note button anytime to start composing a private Note (text post) to your Shaarli'|t}"
-         href="?private=1&amp;post="
-         class="bookmarklet-link">
+         class="bookmarklet-link"
+         href="javascript:(
+          function(){
+            window.open(
+              '{$pageabsaddr}?private=1&amp;post='+
+              '&amp;description='%20+%20encodeURIComponent(document.getSelection())+
+              '&amp;source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1'
+            );
+          }
+        )();">
         <span class="pure-button pure-u-lg-2-3 pure-u-3-4">✚ {'Add Note'|t}</span>
       </a>
     </div>
        value="{'Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link'|t}">
 </body>
 </html>
-
index c36aa5b5ef0fa1afc127e342bcbde104fc2d5010..69689807e2cdbc9f71390927187630800e46c5b5 100644 (file)
                </a><br><br>
                <a class="smallbutton"
                        onclick="return alertBookmarklet();"
-                       href="?private=1&amp;post="><b>✚Add Note</b></a>
+        href="javascript:(
+          function(){
+            window.open(
+              '{$pageabsaddr}?private=1&amp;post='+
+              '&amp;description='%20+%20encodeURIComponent(document.getSelection())+
+              '&amp;source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1'
+            );
+          }
+        )();"><b>✚Add Note</b></a>
                <a href="#" onclick="return alertBookmarklet();">
                        <span>
                                &#x21D0; Drag this link to your bookmarks toolbar (or right-click it and choose Bookmark This Link....).<br>