Skip to content

Instantly share code, notes, and snippets.

@JoelBesada
Forked from omarrr/Backtick_Delicious.md
Last active July 8, 2019 13:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save JoelBesada/7881195 to your computer and use it in GitHub Desktop.
Save JoelBesada/7881195 to your computer and use it in GitHub Desktop.
(function (e, t) {
var n = e.document;
setTimeout(function () {
function a(e) {
if (e.data === "destroy_bookmarklet") {
var r = n.getElementById(t);
if (r) {
n.body.removeChild(r);
r = null
}
}
}
var t = "DELI_bookmarklet_iframe",
r = n.getElementById(t);
if (r) {
return
}
var i = "https://delicious.com/save?source=bookmarklet&",
s = n.createElement("iframe");
s.id = t;
s.src = i + "url=" + encodeURIComponent(e.location.href) + "&title=" + encodeURIComponent(n.title) + "&note=" + encodeURIComponent("" + (e.getSelection ? e.getSelection() : n.getSelection ? n.getSelection() : n.selection.createRange().text)) + "&v=1.1";
s.style.position = "fixed";
s.style.top = "0";
s.style.left = "0";
s.style.height = "100%";
s.style.width = "100%";
s.style.zIndex = "16777270";
s.style.border = "none";
s.style.visibility = "hidden";
s.onload = function () {
this.style.visibility = "visible"
};
n.body.appendChild(s);
var o = e.addEventListener ? "addEventListener" : "attachEvent";
var u = o == "attachEvent" ? "onmessage" : "message";
e[o](u, a, false)
}, 1)
})(window)
{
"name": "Add to Delicious",
"description": "Add the current page to Delicious.",
"icon": "https://backtickio.s3.amazonaws.com/icons/delicious.png",
"link": "http://delicious.com"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment