Skip to content

Instantly share code, notes, and snippets.

@TypeA2
Created September 6, 2024 09:03
Show Gist options
  • Select an option

  • Save TypeA2/4e1a78a5f2f3a8457a866acae089cc64 to your computer and use it in GitHub Desktop.

Select an option

Save TypeA2/4e1a78a5f2f3a8457a866acae089cc64 to your computer and use it in GitHub Desktop.
/* Initial version: 2024-09-06
* Current version: 2024-09-06
*/
javascript:void(async () => {
let text = "";
for (const e of document.querySelector("h2 + div > h1").childNodes) {
console.log(e.nodeName)
switch (e.nodeName) {
case "A": {
const linked = e.textContent.substring(1);
text += `"#${linked}":[https://www.instagram.com/explore/tags/girlsbandcry/${linked}/]`;
break;
}
case "BR":
text += "\n";
break;
case "#text":
text += e.textContent;
}
}
navigator.clipboard.writeText(text);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment