Skip to content

Instantly share code, notes, and snippets.

@noahlearner
Last active September 8, 2021 14:19
Show Gist options
  • Save noahlearner/2ef9c6d8730bc96e02ff4b07fa721885 to your computer and use it in GitHub Desktop.
Save noahlearner/2ef9c6d8730bc96e02ff4b07fa721885 to your computer and use it in GitHub Desktop.
javascript: (function() { var e = document.querySelectorAll("#i7 > div.FAZ4xe.FoDaAb.hjTnPc > span > span > div > a > span");let t = []; for (let n = 0; n < e.length; n++){ let o = e[n].innerText;t.push(o)}var n = t.filter((function (e, t, n) { return n.indexOf(e) === t })).filter(Boolean);n.toString();linksOut = n.join("\n");var o = document.createElement("a");function c(e) {navigator.clipboard ? navigator.clipboard.writeText(e).then((function () { }), (function (e) { })) : function (e) {var t = document.createElement("textarea");t.value = linksOut, t.style.top = "0", t.style.left = "0", document.body.appendChild(t), t.focus(), t.select(); try { document.execCommand("copy") } catch (e) { } document.body.removeChild(t)}}o.id = "copy", o.href = "#", o.innerText = "Copy Links", o.style.fontSize = "x-large", document.body.querySelector(".dAEiw.dXdtIf").appendChild(o), o.addEventListener("click", (function (f) {f.preventDefault(); c(linksOut) }))}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment