Skip to content

Instantly share code, notes, and snippets.

@johnjohndoe
Last active July 25, 2017 13:49
Show Gist options
  • Save johnjohndoe/4568198 to your computer and use it in GitHub Desktop.
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.
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) + '&notes=' +
encodeURIComponent('' + (window.getSelection ? window.getSelection() :
document.getSelection ? document.getSelection() :
document.selection.createRange().text));
document.body.appendChild(node)
})(window.jQuery);
@chrisabrams
Copy link

Would you please make a note that you are not an author or contributor of this code.

@natevw
Copy link

natevw commented Jan 22, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment