Javascript bookmark stopped working in Firefox 13

前端 未结 3 1758
情歌与酒
情歌与酒 2021-02-19 05:40

In Firefox version 13, bookmarklets (bookmarks with a javascript: URL, e.g. javascript: alert(\"it works\") stopped working. Is there any solution to u

3条回答
  •  囚心锁ツ
    2021-02-19 06:34

    NOTE: this solution no longer appears to work as of FF41. See JS Bookmarklets stopped working in Firefox 41.


    If you first load almost any URL, including about:blank, then a Javascript bookmark will work in that tab.

    Since Firefox's default behavior for new tabs is about:newtab, which is nothing, and bookmarklets only run once something is loaded, you can do the following to set a default page, and then run bookmarklets:

    1. open about:config
    2. find browser.newtab.url
    3. double-click and change from about:newtab to about:blank (or URI of your choice)
    4. Ctrl-T and run bookmarklets in new tabs!

提交回复
热议问题