Updated Fiamma “Add link” bookmarklet (now there are _two_ of them!)

Now I have a bookmarklet that gets triggered when I’m on a page I want to bookmark. It window.open()’s to the wiki page named after the page title and passes two parameters to the template: the title and the URI of the page. The template gets preloaded1More here: https://www.mediawiki.org/wiki/Manual:Creating_pages_with_preloaded_text .

The template itself looks pretty trivial. (Note to self: Templates are case sensitive?!)

Then we get a page with an URI and a title. I fill the additional values like this:

Then I run the bookmarklet, which transform it to the following:

Then I could add something, and then save it.

The new bookmarklet now understands an unlimited number of keywords and categories.

The updated bookmarklet:

Todo:

Make it check for bad characters (think “|”, which mediawiki doesn’t like in names and parameters, and everything else here: https://www.mediawiki.org/wiki/Manual:Page_title; make it do something for empty titles, so I don’t get redirected to the main page; put together all of this and upload it to github?

The final bookmarklet looks like this:

Unrelated to the above:

Apparently, after N years of studying programming and tweaking/optimizing whatever incarnation of my workspace, I’m getting it. Like, you can really solve your own problems by writing your own code?! Wow!

What happens next? I’m gonna go around writing extensions and stuff? How was the quote: “Be a man, write your own drivers!”

Regardless, this small and dead-simple bookmarklet that solves my own problems has done much more for my motivation than anything else I’ve ever tried in the last couple of years.

Wohoo!

(Y)

Footnotes   [ + ]

Leave a Reply

Your email address will not be published. Required fields are marked *