Here are the specifications for this task:
- A bookmarklet will be created i.e. a browser bookmark that contains JavaScript.
- It will be called from a Mozilla custom keyword i.e. it will be called via a short string followed by a query string in the address bar, and the query string will be represented with the "%s" string within the bookmarklet.
- The task is to unescape from the query string and print the result in the tab corresponding to the address bar.
So, for example, entering the following in the address bar:
ue http%3A%2F%2Fmentalfloss.com%2Farticle%2F58135%2F17-excellent-animal-illustrations-16th-century-book
Should produce:
http://mentalfloss.com/article/58135/17-excellent-animal-illustrations-16th-century-book
printed out in the corresponding tab.
I've assigned:
javascript:document.write(decodeURIComponent(%s));
to the bookmarklet, and associated it with the Mozilla custom keyword "ue", but it doesn't work when called as stated above. It produces no results.
Google Chrome has similar functionality called bookmark keywords, but implementation details might differ, so I'm asking specifically about Mozilla custom keywords. You can still try to help if you're a Google Chrome user.
Thanks.