Skip to content
Snippets Groups Projects
Select Git revision
  • e81d1a390fdc958ba789ba69b449112ac6caca0d
  • experimental default protected
  • v2023.2.5-ffs
  • nrb/ex400-remove-wps
  • nrb/airmax-test
  • v2023.2.4-ffs
  • nrb/ar9344-reset-sequence
  • autinerd/experimental-openwrt-24.10
  • v2023.2.3-ffs
  • v2023.2.2-ffs
  • v2023.2-ffs
  • v2023.1-ffs
  • v2022.1.4-ffs
  • feature/addMikrotikwAP
  • v2022.1.3-ffs
  • v2021.1.2-ffs
  • v2022.1.1-ffs
  • master protected
  • v2021.1.1-ffs
  • nrb/gluon-master-cpe510
  • v2021.1-ffs
  • experimental-2025-07-04
  • experimental-2025-07-04-base
  • experimental-2025-07-01
  • experimental-2025-07-01-base
  • experimental-2025-06-25
  • experimental-2025-06-25-base
  • experimental-2025-06-24
  • experimental-2025-06-24-base
  • experimental-2025-06-22
  • experimental-2025-06-22-base
  • v2023.2.5-ffs0.1
  • experimental-2025-06-08
  • experimental-2025-06-08-base
  • experimental-2025-06-06
  • experimental-2025-06-06-base
  • experimental-2025-05-27
  • experimental-2025-05-27-base
  • experimental-2025-05-18
  • experimental-2025-05-18-base
  • experimental-2025-05-15
41 results

gluon-reload

Blame
  • app.js 37.44 KiB
    /*
     * This program is free software: you can redistribute it and/or modify
     * it under the terms of the GNU Affero General Public License as published by
     * the Free Software Foundation, either version 3 of the License, or
     * (at your option) any later version.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU Affero General Public License for more details.
     *
     * You should have received a copy of the GNU Affero General Public License
     * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     */
    var firmwarewizard = function() {
      var app = {};
    
      // helper functions
      function $(s) {
        return document.querySelector(s);
      }
    
      function toggleClass(e, cssClass) {
        setClass(e, cssClass, !hasClass(e, cssClass));
      }
    
      function hasClass(e, cssClass) {
        var searchstring = (' ' + e.className + ' ').replace(/[\n\t]/g, " ");
        return (searchstring.indexOf(' ' + cssClass+ ' ') !== -1);
      }
    
      function setClass(e, cssClass, active) {
        if (active && !hasClass(e, cssClass)) {
          e.className = (e.className+' '+cssClass).trim();
        } else if (!active && hasClass(e, cssClass)) {
          e.className = e.className.replace(cssClass, '');
        }
      }
    
      function show_inline(s) {
        $(s).style.display = 'inline-block';
      }
    
      function show_block(s) {
        $(s).style.display = 'block';
      }
    
      function hide(s) {
        $(s).style.display = 'none';
      }
    
      // Object.values() replacement
      function ObjectValues(obj) {
        return Object.keys(obj).map(function(key) { return obj[key]; });
      }
    
      function isEmptyObject(obj) {
          for (var name in obj) {
              return false;
          }
          return true;
      }
    
      function scrollDown() {
        try {
          window.scrollBy({
            top: 512,
            left: 0,
            behavior: 'smooth'
          });