简体   繁体   English

从浏览器禁用 Url 栏

[英]Disable Url Bar from Browser

I'm trying to disable the address bar on the browser.我正在尝试禁用浏览器上的地址栏。 All opinions suggest that this is not possible, especially in modern browsers.所有意见都表明这是不可能的,尤其是在现代浏览器中。 I was about to believe this and move on until I found out that Pluralsight did it.我正要相信这一点并继续前进,直到我发现 Pluralsight 做到了。 Here is a link.是一个链接。 Just expand one of the sections and click on one of the videos.只需展开其中一个部分,然后单击其中一个视频。 No matter which browser you use, it will work (a new window will open with a disabled address bar).无论您使用哪种浏览器,它都能正常工作(新的 window 将打开并禁用地址栏)。 I had a close look at the page source but that revealed nothing.我仔细查看了页面源代码,但没有发现任何信息。 I can assess the following:我可以评估以下内容:

  • They are not using any plugin (no Silverlight or Flash) because it worked just fine on Edge which does not support plugins.他们没有使用任何插件(没有 Silverlight 或 Flash),因为它在不支持插件的Edge上运行良好。
  • It's not a regular popup window, because I got no warnings or popup block messages with any browser whatsoever.这不是常规的弹出窗口 window,因为我没有收到任何浏览器的警告或弹出阻止消息。

Can anybody suggest how that can be done?任何人都可以建议如何做到这一点?

It's actually just a plain ol' window.open() being used. 它实际上只是一个普通的window.open()

In the source of the page you linked to is: 在您链接到的页面的源中是:

function openPlayerFromTranscript(e, t, r) {
    var n = "width=1354,height=836,status=0,titlebar=0,scrollbars=0,menubar=0,toolbar=0,location=0,resizable=1";
    window.open(getPlayerUrlForTranscript(e, t, r), "psplayer", n)
}

window.open(url, '_blank', 'location=0', 'menubar=0', 'scrollbars=0', 'status=0', 'titlebar=0', 'toolbar=0'); window.open(url, '_blank', 'location=0', 'menubar=0', 'scrollbars=0', 'status=0', 'titlebar=0', 'toolbar=0');

'location=0' will work only for Opera browser 'location=0' 仅适用于 Opera 浏览器

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

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