Firefox 全屏时如何隐藏所有工具栏?

Ody*_*dys 15 firefox fullscreen

我想使用firefox作为前端,让用户只能看到一个网站。

我找到了如何在全屏模式下启动 Firefox,默认情况下工具栏是隐藏的,但是当用户悬停在屏幕顶部时,我无法使工具栏(地址栏、标签栏等)不显示。

有没有办法做到这一点?

rgt*_*gtk 8

您可以利用 HTML5 全屏 API。

将下面的代码粘贴到控制台中,然后单击大黑框以激活全屏模式:

(function() {
  var el = document.createElement('div'),
      docEl = document.documentElement;

  el.innerText = 'Go to fullscreen view';
  el.setAttribute('style', 'position: fixed; top: 10%; left: 10%; padding: 30%; background: #000; color: #fff; opacity: .7; cursor: pointer;')
  document.body.appendChild(el)

  el.onclick = function() {
    if (docEl.requestFullscreen) {
      docEl.requestFullscreen();
    } else if (docEl.mozRequestFullScreen) {
      docEl.mozRequestFullScreen();
    } else if (docEl.webkitRequestFullscreen) {
      docEl.webkitRequestFullscreen();
    }
    document.body.removeChild(el);
  };
})();
Run Code Online (Sandbox Code Playgroud)

...或使用书签:

javascript:(function(){var e=document.createElement("div"),t=document.documentElement;e.innerText="Go to fullscreen view";e.setAttribute("style","position: fixed; top: 10%; left: 10%; padding: 30%; background: #000; color: #fff; opacity: .7; cursor: pointer;");document.body.appendChild(e);e.onclick=function(){if(t.requestFullscreen){t.requestFullscreen()}else if(t.mozRequestFullScreen){t.mozRequestFullScreen()}else if(t.webkitRequestFullscreen){t.webkitRequestFullscreen()}document.body.removeChild(e)}})();
Run Code Online (Sandbox Code Playgroud)


小智 8

转到 about:config ,搜索browser.fullscreen.autohide并将值更改为 true。

可能的值及其影响

真的

在全屏模式下自动折叠工具栏和选项卡栏,并且仅在鼠标悬停时显示。(默认)

错误的

始终以全屏模式显示工具栏和选项卡栏。

  • 正如您自己指出的,默认情况下它已经是正确的,因此毫无意义。 (2认同)

BBl*_*ake 6

正如 lexu 所提到的,您想要的通常称为“信息亭模式”。据我所知,Firefox 不包含内置的 kiosk 模式功能(我认为只有 IE 包含在基本版本中),但它可以与几个不同的 Firefox 插件一起使用。

R-Kiosk可能是最受欢迎的一种。我之前在 Firefox 3.x 设置中的一项工作中使用过它,但我已经有几年没有尝试过它了,所以我不知道与较新浏览器的兼容性和功能。它确实说明它可以通过最新版本的 Firefox 工作。

另一个相当流行的是FF Fullscreen,我还没有尝试过,但它似乎不是阻止用户进入桌面的完整信息亭模式,而只是一个没有工具栏模式的全屏模式,这可能是你想要的反正都在找。您的问题没有说明您是否要阻止用户访问桌面。