Paperlined.org
apps > firefox
document updated 13 days ago, on Jun 1, 2026

Firefox keyword bookmarks[?] can be set to bookmarklets!

Bookmarks can execute Javascript code. This gives you a lot of flexibility.

Option #1 — Do different things based on the current URL

For example:

// This keyword bookmark jumps to the Recent Changes page on several different Mediawiki websites.
//
// I typically use "recent" as the bookmark's keyword.

// Is this a specific Mediawiki site that we recognize?
if ( /\.wikipedia\.org$|^terraria\.wiki\.gg$|\.mediawiki\.org$/ .test( window.location.hostname )) {
    wikiroot = "https://" + window.location.hostname + "/wiki/"
}

if (wikiroot) {
    // Navigate to that page.
    window.location = wikiroot + "Special:RecentChanges"
}

(in bookmarklet form)

Option #2 — Do different things based on the contents of the current page

...

Tangent: The way I typically convert Javascript code to a Bookmarklet

It needs to first minify the code (to remove comments and such) and then add the "javascript:" boilerplate.