Editing Built-in Chrome Bookmarks Manager Folder/Sub-Folder Auto-Expansion?

前端 未结 1 1749
感情败类
感情败类 2021-02-06 03:52

When using the the built-in bookmark manager in Chrome there is a navigation pane on the left which contains all the folders/sub-folders containing bookmarks. When one mouseover

1条回答
  •  北荒
    北荒 (楼主)
    2021-02-06 04:14

    Well done with locating the relevant code for this.

    Unfortunately, I don't believe Chrome extensions can access these files. This would require an API to those variables (and you'd have to rebuild the application when changing any settings).

    I was able to come up with two options through some research.


    Option 1

    A better solution compared to an extension (especially if this is just a one-time override) would be to fork the project and edit that code for your own customized version of Chromium. Here is a guide for getting started with the code, and building/running your own version of Chromium. Maybe if you come up with a good solution to this problem, you could even submit a patch :) Even better would be to build an API to those files, and then you could create an extension.

    pros: you'd just have to change one number in the code. cons: you'd have to deal with maintaining a forked version of Chromium.


    Option 2

    Create an Override Page

    Override pages are a way to substitute an HTML file from your extension for a page that Google Chrome normally provides. In addition to HTML, an override page usually has CSS and JavaScript code.

    An extension can replace Bookmark Manager: The page that appears when the user chooses the Bookmark Manager menu item from the Chrome menu or, on Mac, the Bookmark Manager item from the Bookmarks menu. You can also get to this page by entering the URL chrome://bookmarks.

    Using chrome.bookmarks, you could then build a customized bookmarks page.

    pros: Solution only requires an extension! cons: you'd have to build the page from scratch or find some other replication technique.

    A number of extensions have achieved this method, and maybe through google searching (keywords "custom" and "manager" are helpful), you may also find a solution you like or can contribute to.

    0 讨论(0)
提交回复
热议问题