</a><br><br>
<a class="smallbutton"
onclick="return alertBookmarklet();"
- href="?private=1&post="><b>✚Add Note</b></a>
+ href="javascript:(
+ function(){
+ window.open(
+ '{$pageabsaddr}?private=1&post='+
+ '&description='%20+%20encodeURIComponent(document.getSelection())+
+ '&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>
⇐ Drag this link to your bookmarks toolbar (or right-click it and choose Bookmark This Link....).<br>
</span>
</a><br><br>
- {if="$sslenabled"}
- <a class="smallbutton" onclick="activateFirefoxSocial(this)"><b>✚Add to Firefox social</b></a>
- <a href="#">
- <span>⇐ Click on this button to add Shaarli to the "Share this page" button in Firefox.</span>
- </a><br><br>
- {/if}
-
{loop="$tools_plugin"}
{$value}
{/loop}
<div class="clear"></div>
<script>
- {if="$sslenabled"}
- function activateFirefoxSocial(node) {
- var loc = location.href;
- var baseURL = loc.substring(0, loc.lastIndexOf("/"));
-
- // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable.
- var data = {
- name: "{$shaarlititle}",
- description: "The personal, minimalist, super-fast, no-database delicious clone.",
- author: "Shaarli",
- version: "1.0.0",
-
- iconURL: baseURL + "/images/favicon.ico",
- icon32URL: baseURL + "/images/favicon.ico",
- icon64URL: baseURL + "/images/favicon.ico",
-
- shareURL: baseURL + "{noparse}?post=%{url}&title=%{title}&description=%{text}&source=firefoxsocialapi{/noparse}",
- homepageURL: baseURL
- };
- node.setAttribute("data-service", JSON.stringify(data));
-
- var activate = new CustomEvent("ActivateSocialFeature");
- node.dispatchEvent(activate);
- }
- {/if}
function alertBookmarklet() {
alert('Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link...');
return false;