{"id":464,"date":"2013-08-13T15:26:04","date_gmt":"2013-08-13T09:56:04","guid":{"rendered":"http:\/\/smritiweb.com\/navin\/?p=464"},"modified":"2013-08-13T15:26:59","modified_gmt":"2013-08-13T09:56:59","slug":"a-delicious-bookmarklet-that-works-with-noscript","status":"publish","type":"post","link":"https:\/\/smritiweb.com\/navin\/technology\/a-delicious-bookmarklet-that-works-with-noscript","title":{"rendered":"A delicious bookmarklet that works with noscript"},"content":{"rendered":"<p>This is technical, so unless you&#8217;re a do-it-yourself programming\/javascript geek, you will not find it interesting.<\/p>\n<p>I was trying to solve this problem:<\/p>\n<ul>\n<li>I like to bookmark interesting links on my <a href=\"http:\/\/delicious.com\">delicious.com<\/a> account<\/li>\n<li>I like to use NoScript with my firefox &#8211; this disables javascript\/flash\/ads\/XSS and other things on a lot of sites, giving me a much more stable experience on various websites.<\/li>\n<\/ul>\n<p>Unfortunately, both of these things don&#8217;t really go well together. NoScript blocks the <a href=\"https:\/\/delicious.com\/tools\">delicious bookmarklet<\/a>, and at this time there doesn&#8217;t seem to be a any easy way to get it to work as it is. <\/p>\n<p>I tried adding <code>https:\/\/delicious\\.com\/save<\/code> to the Anti-XSS Protection Exceptions in NoScript preferences but that did not help. <\/p>\n<p>Of course, I can always copy the URL of the site, go to <code>delicious.com<\/code> and then add the link manually, but that is too much effort. I do this often enough that I needed to automate the process. <\/p>\n<p>After some trial-and-error I decided that the problem was the use of iframes in the delicious bookmarklet. So I wrote this much simplified delicious bookmarklet which works like a charm.<\/p>\n<p>Here is the code for the bookmarklet:<\/p>\n<pre><code>javascript:window.location='https:\/\/delicious.com\/save?url='+encodeURIComponent(window.location.href)+\"&amp;title=\"+encodeURIComponent(window.document.title)+\"&amp;v=1.1\";\n<\/code><\/pre>\n<p>Just add a bookmark to your Bookmarks Toolbar with &#8220;Add to Delicious&#8221; as the name and the above code as the location. Now on any website, click on &#8220;Add to Delicious&#8221; and you get redirected to a page that prompts you for the tags and will then add the delicious bookmark.<\/p>\n<p>Note: if you want to automatically include the current selection as the note\/description in the bookmark, use this code instead (I haven&#8217;t tested it, since I&#8217;m not interested in a note, but I think it should work):<\/p>\n<pre><code>javascript:window.location='https:\/\/delicious.com\/save?url='+encodeURIComponent(window.location.href)+\"&amp;title=\"+encodeURIComponent(window.document.title)+\"&amp;note=\"+encodeURIComponent(\"\"+(window.getSelection?window.getSelection():window.document.getSelection?window.document.getSelection():window.document.selection.createRange().text))+\"&amp;v=1.1\";\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This is technical, so unless you&#8217;re a do-it-yourself programming\/javascript geek, you will not find it interesting. I was trying to solve this problem: I like to bookmark interesting links on my delicious.com account I like to use NoScript with my firefox &#8211; this disables javascript\/flash\/ads\/XSS and other things on a lot of sites, giving me &hellip; <a href=\"https:\/\/smritiweb.com\/navin\/technology\/a-delicious-bookmarklet-that-works-with-noscript\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">A delicious bookmarklet that works with noscript<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[7],"tags":[86,87,85,82,83,84,88],"_links":{"self":[{"href":"https:\/\/smritiweb.com\/navin\/wp-json\/wp\/v2\/posts\/464"}],"collection":[{"href":"https:\/\/smritiweb.com\/navin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smritiweb.com\/navin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smritiweb.com\/navin\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/smritiweb.com\/navin\/wp-json\/wp\/v2\/comments?post=464"}],"version-history":[{"count":1,"href":"https:\/\/smritiweb.com\/navin\/wp-json\/wp\/v2\/posts\/464\/revisions"}],"predecessor-version":[{"id":465,"href":"https:\/\/smritiweb.com\/navin\/wp-json\/wp\/v2\/posts\/464\/revisions\/465"}],"wp:attachment":[{"href":"https:\/\/smritiweb.com\/navin\/wp-json\/wp\/v2\/media?parent=464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smritiweb.com\/navin\/wp-json\/wp\/v2\/categories?post=464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smritiweb.com\/navin\/wp-json\/wp\/v2\/tags?post=464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}