1

I am using chrome and tampermonkey. I have very small knowledge in coding so I cannot follow most of the discussions here so please bear that in mind.

I have an HTML file that I downloaded from snapchat (it is a backup of my data) and it has a lot of "download" links. One for each of my photos stored on their servers.

I do not want to click each one so I tried to make all the href in this file into an array and then open the ones having "download" in them with _blank but it didn't work. After many hours, I realized that the href was not a website but a javascript with a website. An example:

(<"a href="javascript:downloadMemories('https://app.snapchat.com/dmd/memories?uid=7e2f6a88-6de9-4448-913a-0');">download</a>")

Does this mean that I cannot open each href in a new tab? Do they have to be opened from the same window?

Is there a way I can open all of them with a script? I tried using many scripts I found online but it only opens the first one and then the script stops. There was no persistence to open all of them one by one. The script doesn't remember that the first one was opened and then it should move down to the next one.

I appreciate any help.

  • 1
    Take a look at that duplicate, it should have exactly what you're looking for. `javascript:downloadMemories(. . .)` implies that the HTML file you got from Snapchat contains a JavaScript function called "downloadMemories," which is designed to handle these links correctly when you click on one. You could always peek into how that's working and adjust how it opens the links from there. – zcoop98 Dec 17 '20 at 23:37

0 Answers0