How to change font size of address bar in Chrome programmatically

后端 未结 2 1730
被撕碎了的回忆
被撕碎了的回忆 2021-02-13 06:15

I want to change the font size of the address bar in Chrome programmatically since it\'s too big for me.

Is there any way to do this?

2条回答
  •  野性不改
    2021-02-13 07:08

    Generally, the font size of the address bar is determined by your OS's default font size. Read comments here: https://code.google.com/p/chromium/issues/detail?id=46472. So if you want to adjust it, change your OS default.

    If you build your own version of Chrome, you can change the look and feel of the browser, but you'll have to write different code for each platform you want to support.

    If you don't want to build your own version of Chrome, then on Windows, you can inject yourself into the Chrome process with SetWindowsHook or SetWindowsHookEx, find the window handle corresponding to the address bar, and then do anything you want to it. Similar idea on OSX. Not sure about Linux. This isn't a recommended approach; it's invasive and subject to breakage.

    As far as a Chrome API for an extension or app to change the address bar size, nope, can't do that.

提交回复
热议问题