How to have favicon / icon set when bookmarklet dragged to toolbar?

后端 未结 9 1926
有刺的猬
有刺的猬 2020-12-02 05:03

I\'ve made myself a bookmarklet, and it functions just fine, but when added to a toolbar in Opera or Firefox, it just takes on the default bookmark icon for the browser (a g

9条回答
  •  暖寄归人
    2020-12-02 05:34

    Here is how you can do this:

    1. Drag you bookmarklet to Bookmarks Bar.
    2. Next to it create a bookmark of a site which favicon you want to use for your bookmarklet.
    3. Open Bookmarks Manager, click Organize dropdown, and select Export, save your bookmarks as html file.
    4. Open that html file in text editor.
    5. Find the bookmark you just created, lets say its Gmail bookmark, you should have an html code for it, that looks like this:

    Gmail

    1. Copy the entire ICON tag
    2. In the same file find the bookmarklet you created, and insert the ICON tag you copied into your bookmarklet tag:

    MyBookmarklet

    1. Save this file
    2. Return to Chrom Bookmarks Manager, click again Organize, and select Import
    3. Import HTML file you just edited, your bookmarklet now has a favicon.

    Basically the procedure is to get ICON attribute of a bookmark tag and insert it into bookmarklet tag

提交回复
热议问题