full screen – F11

Homepage Community Forums Aspire Theme Support full screen – F11

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #18843
    aranat
    Customer

      Hey, guys.

      Would it be a way to include a button to display the web as when you clicked F11?
      Just wondering,
      Thanks

      #18844
      aranat
      Customer

        I’m found it!

        HTML:

        <input type=”button” value=”click to toggle fullscreen” onclick=”toggleFullScreen()”>

        JavaScript:
        function toggleFullScreen() {
        if ((document.fullScreenElement && document.fullScreenElement !== null) ||
        (!document.mozFullScreen && !document.webkitIsFullScreen)) {
        if (document.documentElement.requestFullScreen) {
        document.documentElement.requestFullScreen();
        } else if (document.documentElement.mozRequestFullScreen) {
        document.documentElement.mozRequestFullScreen();
        } else if (document.documentElement.webkitRequestFullScreen) {
        document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
        }
        } else {
        if (document.cancelFullScreen) {
        document.cancelFullScreen();
        } else if (document.mozCancelFullScreen) {
        document.mozCancelFullScreen();
        } else if (document.webkitCancelFullScreen) {
        document.webkitCancelFullScreen();
        }
        }
        }

      Viewing 2 posts - 1 through 2 (of 2 total)
      • The topic ‘full screen – F11’ is closed to new replies.