Add a bookmark that is only javascript, not a URL

前端 未结 5 1899
傲寒
傲寒 2020-12-08 02:28

I\'m thinking that the reason I can\'t do this is because it might be a huge security hole, but here goes...

I want to have a bookmark on my browser (FF3, preferably

5条回答
  •  攒了一身酷
    2020-12-08 02:45

    One minor catch. IE can only handle a 508 character URL in this format. If you save it in IE with a url longer than this, it will truncate without warning and thus fail.

    If you need a really complex script, you'll need to use a "hosted" bookmarklet, where you have a short bookmark that injects a script tag into the page, to "call" your hosted bookmarklet.

    It isn't as nice/portable, but its the only workaround.

提交回复
热议问题