Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.
Today's riddle: Any chance to repair the soup bookmarklet?

What's broken?
The bookmarklet tries to load a script, which currently fails with a server error.

Can we find an old, cached version anywhere on the Internet?
Let's ask the wayback machine. Ah, by pure chance the internet archive happened to download the script, last version is from 2014 though. (We can get the unmodified file by appending "id_" to the version number.)

Any magic we might miss?
Yip, after some experimenting it's clear the server expects to see a version in the "v" parameter, and the target for the posted form should point to the popup window of course. Not difficult to guess the expected version: 5, and let's set the target to a fixed window name.

Where can we put it?
Let's just upload the script into soup, as a "file".

How can we use it in the bookmarklet?
Well, decode and tidy up the original bookmarklet, set the popup window name to the same fixed value we used in the script, change the bookmarklet's script url to the asset url of the uploaded file, recompress and reencode the result.

Soooo?
Here's the temporary workaround, though I can't format it as a link in soup :(. Just copy&paste this into the URL field of a bookmark:

javascript:(function()%7Bvar%20es%3D%5B%22body%22%2C%22frameset%22%2C%22head%22%5D%2Cu%3Ddocument.location.protocol%2B%22%2F%2Fwww.soup.io%2Fbookmarklet-loading.html%22%3Bwindow.open(u%2C%22soup_bookmark_workaround%22%2C%22toolbar%3D0%2Cresizable%3D1%2Cscrollbars%3Dyes%2Cstatus%3D1%2Cwidth%3D450%2Cheight%3D400%22)%3Btry%7Bvar%20s%3Ddocument.createElement(%22script%22)%3Bs.setAttribute(%22src%22%2C%22https%3A%2F%2Fasset-f.soupcdn.com%2Fasset%2F13650%2F3220_fb53.js%22)%3Bfor(var%20i%3D0%3Bi%3Ces.length%3Bi%2B%2B)%7Bvar%20e%3Ddocument.getElementsByTagName(es%5Bi%5D)%5B0%5D%3Bif(e)%7Be.appendChild(s)%3Bbreak%7D%7D%7Dcatch(e)%7Balert(%22This%20does%20not%20work%20here.%22)%7D%7D)()
Reposted bywonkofinkreghpaketrokocuda

Don't be the product, buy the product!

Schweinderl