Last active
September 5, 2019 11:47
-
-
Save yhdesai/38ab71795317be52301dfb51d8bd779e to your computer and use it in GitHub Desktop.
Medium Bookmark List Export
This file contains hidden or 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
| var links = []; | |
| var ele = document.getElementsByClassName("link"); | |
| for(var i=0, len=ele.length; i<len; i++) | |
| { | |
| links.push(ele[i].href); | |
| } | |
| function setBody(){ | |
| links.forEach(function(link) { | |
| var linkA = document.createElement("a"); | |
| linkA.href=link; | |
| linkA.text=link; | |
| document.body.appendChild(linkA); | |
| var br = document.createElement("br"); | |
| document.body.appendChild(br); | |
| document.body.appendChild(br); | |
| openInNewTab(link); | |
| }); | |
| } | |
| function openInNewTab(url) { | |
| window.open(url, '_blank'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment