如何以编程方式在Chrome中更改地址栏的字体大小 [英] How to change font size of address bar in Chrome programmatically

查看:199
本文介绍了如何以编程方式在Chrome中更改地址栏的字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Chrome中以编程方式更改地址栏的字体大小,因为它对我来说太大了。



有没有办法做到这一点?

解决方案

地址栏的字体大小通常取决于您操作系统的默认字体大小。请在这里阅读评论: https://code.google.com/p/chromium /问题/细节?ID = 46472 。因此,如果您想调整它,请更改您的操作系统默认值。



如果您构建自己的Chrome版本,则可以更改浏览器的外观和风格,但是您如果您不想构建自己的Chrome版本,那么在Windows上,您可以使用SetWindowsHook或SetWindowsHookEx将自己注入Chrome进程,找到与地址栏相对应的窗口句柄,然后执行任何您想要的操作。在OSX上类似的想法。不确定Linux。这不是一个推荐的方法;这是侵入性的,并有可能被破坏。

就扩展程序或应用程序更改地址栏大小的Chrome API而言,无法这样做。

p>

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?

解决方案

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.

这篇关于如何以编程方式在Chrome中更改地址栏的字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆