Anda dapat memanfaatkan API Layar Penuh HTML5.
Tempel kode di bawah ini ke konsol dan klik kotak hitam besar untuk mengaktifkan mode layar penuh:
(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);
};
})();
... atau gunakan bookmarklet:
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)}})();