]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
testing icon in bookmarklet, thanks to @GeekShadow in #94
authorNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Thu, 1 Aug 2013 09:00:27 +0000 (11:00 +0200)
committerNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Thu, 1 Aug 2013 09:00:27 +0000 (11:00 +0200)
tpl/config.html
tpl/head.html

index 1100d455636d0ed0553a6ac93b8acacc136c8387..43c0104cf67a3c456ff6759ecc8f956402aee8c8 100644 (file)
@@ -2,7 +2,7 @@
                <h2>Bookmarklet</h2>
                <p>Thanks to the bookmarklet, you will be able to easily add a link to your poche. If you don't know how use a bookmarklet, <a href="http://support.mozilla.org/en-US/kb/bookmarklets-perform-common-web-page-tasks">have a look here</a>.</p>
                <p>Drag & drop this link to your bookmarks bar and have fun with poche.</p>
-                <p><a style="cursor: move; border: 1px dashed grey; background: white;" title="i am a bookmarklet, use me !" href="javascript:(function(){var%20url%20=%20location.href%20||%20url;window.open('{$poche_url}?action=add&url='%20+%20encodeURIComponent(url),'_self');})();">poche it !</a></p>
+                <p><a ondragend="this.click();" style="cursor: move; border: 1px dashed grey; background: white;" title="i am a bookmarklet, use me !" href="javascript:if(top['bookmarklet-url@inthepoche.com']){top['bookmarklet-url@inthepoche.com'];}else{(function(){var%20url%20=%20location.href%20||%20url;window.open('{$poche_url}?action=add&url='%20+%20encodeURIComponent(url),'_self');})();void(0);}">poche it !</a></p>
 
                 <h2>Password</h2>
                    <form method="post" action="?config" name="loginform">
index e95f61001c11bdc8fbc3747755b5da0ab48aa7e0..dfb1278864e32b87153b3f01d1b02c767b0e55a4 100644 (file)
         <link rel="stylesheet" href="./css/style-light.css" media="all" title="light-style">
         <!-- Dark Theme -->
         <link rel="alternate stylesheet" href="./css/style-dark.css" media="all" title="dark-style">
+        <script>
+          top["bookmarklet-url@inthepoche.com"] = ''
+            +'<!DOCTYPE html>'
+            +'<html>'
+              +'<head>'
+            +'<title>poche it !</title>'
+            +'<link rel="icon" href="{$poche_url}img/favicon.ico" />'
+              +'</head>'
+              +'<body>'
+            +'<script>'
+              +'window.onload=function(){'
+                +'window.setTimeout(function(){'
+                  +'history.back();'
+                +'},250);'
+              +'};'
+            +'</scr'+'ipt>'
+              +'</body>'
+            +'</html>'
+          ;
+        </script>
     </head>
\ No newline at end of file