]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tpl/default/tools.html
Adds Stakali Android app to 3rd party lists
[github/shaarli/Shaarli.git] / tpl / default / tools.html
index 6951ad28b6a8d29c4d8edbccff3f7730926d81c4..ece66884c3438cb9f524131b73f810db877bc4c4 100644 (file)
           function(){
             var%20url%20=%20location.href;
             var%20title%20=%20document.title%20||%20url;
+            var%20desc=document.getSelection().toString();
+            if(desc.length>4000){
+              desc=desc.substr(0,4000)+'...';
+              alert('{function="str_replace(' ', '%20', t('The selected text is too long, it will be truncated.'))"}');
+            }
             window.open(
               '{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+
               '&title='%20+%20encodeURIComponent(title)+
-              '&description='%20+%20encodeURIComponent(document.getSelection())+
+              '&description='%20+%20encodeURIComponent(desc)+
               '&source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1'
             );
           }
          class="bookmarklet-link"
          href="javascript:(
           function(){
+            var%20desc=document.getSelection().toString();
+            if(desc.length>4000){
+              desc=desc.substr(0,4000)+'...';
+              alert('{function="str_replace(' ', '%20', t('The selected text is too long, it will be truncated.'))"}');
+            }
             window.open(
               '{$pageabsaddr}?private=1&post='+
-              '&description='%20+%20encodeURIComponent(document.getSelection())+
+              '&description='%20+%20encodeURIComponent(desc)+
               '&source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1'
             );
           }
     </div>
     <div class="tools-item">
       <a href="https://play.google.com/store/apps/details?id=com.dimtion.shaarlier&hl=fr"
-         title="Android">
-        <span class="pure-button pure-u-lg-2-3 pure-u-3-4">Android</span>
+         title="Android Shaarlier">
+        <span class="pure-button pure-u-lg-2-3 pure-u-3-4">Android Shaarlier</span>
+      </a>
+    </div>
+    <div class="tools-item">
+      <a href="https://stakali.toneiv.eu/"
+         title="Android Stakali">
+        <span class="pure-button pure-u-lg-2-3 pure-u-3-4">Android Stakali</span>
       </a>
     </div>
     <div class="tools-item">