简体   繁体   English

如何在网站上隐藏Google Chrome状态栏

[英]How to hide the Google Chrome status bar on a website

I have noticed the movement towards Progressive Web Apps (PWAs), so I'm trying to learn what they're all about. 我注意到了向渐进式Web应用程序(PWA)的发展,因此我试图了解它们的全部含义。

In most PWA's, I see that the browser chrome is hidden (the URL bar, the back button, home button, search fields, etc.). 在大多数PWA中,我发现浏览器镶边是隐藏的(URL栏,后退按钮,主页按钮,搜索字段等)。 I'm trying to figure out how this is done. 我试图弄清楚这是怎么做的。

I'm trying to build a new PWA from scratch and have, tried this so far: 我正在尝试从头开始构建新的PWA,到目前为止,已经尝试过:

 var hideNav = 'location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes'; window.open('test.html', 'null', hideNav); 

That is what I wrote in my test.html file. 那就是我在test.html文件中写的。 This works when I view the app on Desktop, but it doesn't work on Mobile. 当我在桌面上查看该应用程序时,此方法有效,但在移动设备上不起作用。

(I recently migrated from an android developer to a web developer, so I don't know languages like JavaScript and PHP as well as Java.) (我最近从android开发人员迁移到了web开发人员,因此我不了解JavaScript,PHP和Java等语言。)

You can do so through the Web App Manifest . 您可以通过Web App Manifest进行操作 Here a really good article from the Google Developers site about it. 这里是Google Developers网站上一篇非常好的文章

The Web App Manifest allows developers to control how their apps appear when they are added to the homescreen (another PWA feature). Web App Manifest允许开发人员控制将其添加到主屏幕时的外观(另一种PWA功能)。 In your specific need, you'd be looking to customize the display type from the Web App Manifest. 根据您的特定需求,您将希望从Web App Manifest中自定义显示类型。 You can read more about it in the linked article. 您可以在链接的文章中阅读有关它的更多信息。

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

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