简体   繁体   English

通过javascript隐藏Google工具栏

[英]Hide google Toolbar by javascript

有没有办法在我的浏览器中隐藏google工具栏?

You haven't said which browser you are using so I'm going to assume Internet Explorer* and answer No. 您尚未说出正在使用哪个浏览器,所以我将假设使用Internet Explorer *并回答“否”。

If JavaScript on a web page could manipulate the browser, it would be a serious security hole and could create a lot of confusion for users. 如果网页上的JavaScript可以操纵浏览器,那将是一个严重的安全漏洞,并可能给用户带来很多混乱。

So no... for a good reason: Security. 所以不...有一个很好的理由:安全。

*. *。 If you were using Firefox, and were talking about JavaScript within an extension to manipulate and theme the window chrome then this would be a different story. 如果您使用的是Firefox,并且在扩展中使用JavaScript来对窗口镶边进行操作和主题化设置,那么情况将大为不同。

I really think that it is imposible to do that with javascript. 我真的认为用JavaScript做到这一点是不可能的。 This is because javascript is designed to control the behaviour of the site. 这是因为javascript旨在控制网站的行为。 And the browser is not part of the site. 而且浏览器也不是网站的一部分。

Of course maby you are talking about some other Google toolbar then the plugin in the browser. 当然maby您是在谈论其他Google工具栏,然后是浏览器中的插件。

As far as I know, you cannot access these parts of the browser due to security issues. 据我所知,由于安全问题,您无法访问浏览器的这些部分。 But you can load new browser windows without toolbars as such. 但是您可以加载没有工具栏的新浏览器窗口。 I don't know exactly how (hopefully other users will help yout out), but maybe start here: http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20782379.html 我不知道具体如何(希望其他用户能帮到您),但也许从这里开始: http : //www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20782379.html

(PS: I know, it's experts-exchange, but I'm not going to copy someone elses work, even if it's posted on EE). (PS:我知道,这是专家交流,但是即使它发布在EE上,我也不会复制他人的作品)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM