Last active
July 25, 2017 13:49
-
-
Save johnjohndoe/4568198 to your computer and use it in GitHub Desktop.
Bookmarklet of del.icio.us. Latest version available at https://del.icio.us/tools. This Gist tracks the changes made to the script. Javascript is formatted via http://jsbeautifier.org. - The authors of the script are the guys from del.icio.us.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function($) { | |
var bookmarklet = document.getElementById( | |
'DELI_save_link_slidedown'); | |
if (bookmarklet) { | |
$('#DELI_mist').show(); | |
$('#DELI_save_link_slidedown').slideDown('normal'); | |
return | |
}; | |
if (!window.jQuery) { | |
node = document.createElement('SCRIPT'); | |
node.type = 'text/javascript'; | |
node.src = | |
'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'; | |
document.body.appendChild(node) | |
} | |
node = document.createElement('SCRIPT'); | |
node.type = 'text/javascript'; | |
node.src = window.location.protocol + | |
'//del.icio.us/save/get_bookmarklet_save?url=' + | |
encodeURIComponent(window.location.href) + '&title=' + | |
encodeURIComponent(document.title) + '¬es=' + | |
encodeURIComponent('' + (window.getSelection ? window.getSelection() : | |
document.getSelection ? document.getSelection() : | |
document.selection.createRange().text)); | |
document.body.appendChild(node) | |
})(window.jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this! The new version really sucks (takes forever to load with no feedback, breaks clinks on page after use), this one at least has the new window. Seems there was a version between the two, though, that closed the window on success.