HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/tana/frontend/node_modules/kss/builder/twig/kss-assets/kss-fullscreen.js
(function (window, document) {
  'use strict';

  // Set the configuration values on object creation.
  // - idPrefix: The string that uniquely prefixes the ID of all elements that
  //   can receive the fullscreen focus.
  // - bodyClass: The class that is set on the body element when the fullscreen
  //   mode is toggled on.
  // - elementClass: the class that is set on the element that is receiving the
  //   fullscreen focus.
  var KssFullScreen = function (config) {
    this.idPrefix = config.idPrefix || 'kss-fullscreen-';
    this.bodyClass = config.bodyClass || 'kss-fullscreen-mode';
    this.elementClass = config.elementClass || 'is-fullscreen';

    this.init();
  };

  // Initialize the page to see if the fullscreen mode should be immediately
  // turned on.
  KssFullScreen.prototype.init = function () {
    // Check the location hash to see if it matches the idPrefix.
    if (window.location.hash.slice(0, this.idPrefix.length + 1) === '#' + this.idPrefix) {
      this.setFocus(window.location.hash.slice(1 + this.idPrefix.length));
    }

    var self = this;
    // Initialize all fullscreen toggle buttons.
    var elementList = document.querySelectorAll('a[data-kss-fullscreen]');
    for (var button of elementList) {
      // Get the section reference from the data attribute.
      button.onclick = self.setFocus.bind(self, button.dataset.kssFullscreen);
    }
  };

  // Activation function that takes the ID of the element that will receive
  // fullscreen focus.
  KssFullScreen.prototype.setFocus = function (id) {
    var el;

    // Find the element with the given ID and start fullscreen mode.
    if (el = document.getElementById(id)) {
      el.classList.toggle('is-fullscreen');
      document.body.classList.toggle('kss-fullscreen-mode');

      // When enabling the focus mode, change the location hash.
      if (el.classList.contains('is-fullscreen')) {
        window.location.hash = '#' + this.idPrefix + id;
        // Don't follow the link location.
        return false;
      }
    }

    return true;
  };

  // Export to DOM global space.
  window.KssFullScreen = KssFullScreen;

})(window, document);