I have a bit of code on a wix that is suppose to create a page snapping effect. it’s not working or doing anything at all

the code:// Velo API Reference: https://www.wix.com/velo/reference/api-overview/introduction

$w.onReady(function () {

// Write your Javascript code here using the Velo framework API

// Print hello world:
// console.log("Hello world!");

// Call functions on page elements, e.g.:
// $w("#button1").label = "Click me!";

// Click "Run", or Preview your site, to execute your code

});

export function vectorImage1_viewportEnter(event) {
//This function was added from the Properties & Events panel. To learn more, visit http://wix.to/UcBnC-4
//Add your code for this event here:
$w(‘#section1’).scrollTo();
}
export function vectorImage3_viewportEnter(event) {
// This function was added from the Properties & Events panel. To learn more, visit http://wix.to/UcBnC-4
// Add your code for this event here:
$w(‘#section2’).scrollTo();
}
export function vectorImage4_viewportEnter(event) {
// This function was added from the Properties & Events panel. To learn more, visit http://wix.to/UcBnC-4
// Add your code for this event here:
$w(‘#Section1Regular’).scrollTo();
}

the error messages example: staticEventsManager.ts:75 function section2_viewportEnter is registered as a static event handler but is not exported from the page code. Please remove the static event handler or export the function.

I’ve ran the code in preview multiple times but the snappingf dosen’t happen.

Set a variable that is outside the scope in anotherfile

before having any downvotes or people telling me this is “bad practice”. I know what I am doing and I am aware of that. I am simply looking for a solution.

I am doing a Model View Controller in NodeJS and I would like to simplify the “declared” models inside each model.

Here is an EXAMPLE Model:

let {UserManager} = {...null}; // Obviously, UserManager is null.

class SystemMGR {}; 

module.exports = {
    SystemMGR: SystemMGR,
}

Now, let’s say I loaded all my Models (UserManager, OrderManager, WhateverManager)
I would like to be able to update each Model, without doing direct changed to my Models code.
For example, create a dynamic function from the router that would access some type of “this”, that would then access the variables on the Model scope such as “UserManager” for example.
I am not looking for an advanced example, just updating the variable UserManager to a “hello world” is enough, I cannot figure out any proper solutions.

I tried using methods such as Object.prototype.hasOwnProperty, Object.defineProperty, Proxies, hasOwnPropery.call, none of them worked.
TLDR: update SystemMGR.UserManager without editing Example Model with a function hard coded inside the file.

Please avoid any downvotes, just let me Know if my request is not clear enough.

How to run environment variables with different env files with expo react-native-web?

I try to run different env files with different environment variables with expo react native web.

And I am using expo react native web. So not react-native and not reactjs. I cannot find the configuration for expo react-native-web

So I have two different env files:
dev and prod

.env file looks like:

GENERATE_SOURCEMAP=false 
REACT_APP_NAME=dierenwelzijn_dev

and .env.production looks like:

REACT_APP_ENV=PRODUCTION
REACT_APP_API_URL=https://dierenwelzijndocker.azurewebsites.net  

And I installed the package: env-cmd

Part of package.json file looks:

"scripts": {
        "start:prod": "env-cmd -f .env.production expo start --openssl-legacy-provider, react-app-rewired start react-scripts start",
        "android": "expo start --android",
        "ios": "expo start --ios",
        "web": "expo start --web",
        "eject": "expo eject",
        "lint": "eslint . --ext .js",
        "postinstall": "patch-package",
        "build": "react-scripts build",
        "start-webpack": "webpack-dev-server --mode production --open"
    },
    "dependencies": {
        "@ant-design/icons": "4.0.0",
        "@expo-google-fonts/lato": "^0.2.2",
        "@expo-google-fonts/oswald": "^0.2.2",
        "@expo/config": "^8.1.2",
        "@expo/webpack-config": "^18.1.3",
        "@react-native-async-storage/async-storage": "~1.15.0",
        "@react-navigation/bottom-tabs": "^6.5.4",
        "@react-navigation/native": "^6.1.3",
        "@react-navigation/stack": "^6.3.14",
        "babel-plugin-styled-components-react-native-web": "^0.2.2",
        "css-to-react-native": "^3.2.0",
        "env-cmd": "^10.1.0",
        "expo": "^49.0.21",
        "expo-font": "~10.0.4",
        "expo-screen-orientation": "^6.2.0",
        "expo-status-bar": "~1.2.0",
        "lottie-react-native": "5.0.1",
        "next-transpile-modules": "^10.0.1",
        "patch-package": "^8.0.0",
        "react": "18.2.0",
        "react-dom": "18.2.0",
        "react-native": "0.72.6",
        "react-native-gesture-handler": "~2.1.0",
        "react-native-paper": "^5.1.3",
        "react-native-safe-area-context": "3.3.2",
        "react-native-screens": "~3.10.1",
        "react-native-svg": "^12.5.1",
        "react-native-web": "~0.19.6",
        "react-native-web-lottie": "^1.4.4",
        "react-toast-notifier": "^1.0.3",
        "styled-components": "^5.3.6",
        "webpack-cli": "^5.1.4"
    },

and one of my api calls looks:

export const loginRequest = async (email, password) => {
    try {
        const response = await fetch("http://127.0.0.1/api/user/token/", {
            method: "POST",
            headers: {
                "Content-Type": "application/json",
            },
            body: JSON.stringify({
                email: email,
                password: password,
            }),
        });

        const data = await response.json();

        if (response.ok) {
            await AsyncStorage.setItem("Token", data.token);
            
            return true;
        } else {
            throw new Error(data.token);
        }
    } catch (error) {
        
        error, "email en of wachtwoord is niet goed ingevuld";
    }
};

I start the react native web app with the command:

expo start

and then I choose for option w-for web. And the app is running on port:

http://localhost:19006/

Queston: how can I now use the environment file for production?

How to import and append an excel file in kendo grid using JQuery?

I have a kendo grid and I want to import and append an excel file to my kendo grid. For example, if I have 3 rows in my kendo grid, then after importing the excel file containing 2 rows, the grid should have total of 5 rows data. I have tried importing the excel file but unable to append the file to the grid. Is that possible to do so? Any help will be really appreciated.

I tried to read the excel file and load rows in the grid one by one and then in the last did this.

              var grid = $("#grid").data("kendoGrid");
              var griddataSource = grid.dataSource._data;
              // Assuming the structure of Excel file matches the grid's schema
              for (var i = 1; i < rows.length; i++) {
                var row = rows[i];
                var dataItem = {
                  ProductID: row[0],
                  ProductName: row[1],
                  Price: row[2],
                };
                
                // Add the new data item to the grid's data source
                grid.dataSource.add(dataItem);
              }
              );
              $("#grid").data("kendoGrid").dataSource.data([]);
              $("#grid").data("kendoGrid").dataSource.data([griddataSource]);
              grid.refresh();`
            
I also tried another way using HTML table, with the help of below link but it also didnt work and I also didnt understand how they are using table.

[enter link description here][1]
https://www.aspsnippets.com/Articles/2499/Read-Parse-Excel-File-XLS-and-XLSX-using-jQuery/

how do I put names that can be seen on svg maps using javascript without having to hover over the paths

<a title="tirane" href="/Tirana.html">
   <path d="M324.2 825.8l19.9 25.1 22.2 17.6-1.3 12.2-1.6 4-7.3 14.2-4.5 5.9-9.7 9.5-5 2-4.3-0.6-5.5-4.5-2.4-1.2-1.3 2.2-1.8 5.9-2.7 1.8-23.2 9.5-16.5 11.6-5.8 3-4.8 1.5-6.7-0.2-3.5-1.9-4.9-10.7-4.2-3.9-1.9-3.5-1.1-3.5-1.9-12.5-1.6-4.3-2.2-1.7-2.9 3.5-1.6 4-2.7 3.5-3.4 1.7-11.5-3.1-14.7 3.4-1.1 42.4 0.4 8.9 3.2 7.3 3.1 3.1 5.5 2.5 1.2 3.4 0.1 5.7-1.1 12.8 0.5 9.3-0.5 8.8-1.6 8.1-3.4 5.6-14.7 12.8-11.1 20.7-10.6-7.5-15.4-6.6-14.1 1.8-1.5-12.2-5.8-13-8.4-9.3-9.1-3.4-12.3 0-10.3-2-7.1-6.6-2.7-14.2 0-30.9-1.9-6.7-8.3-7.8-1.6-8.6 7.4 9.9 12.5-0.7 9.3-10.4-2.4-19.3 13.3-7.5 13.9-11.4 10.9-15.6 4.4-19.9-1.3-12.4-4-4.8-6-1.8-7.9-3.9-8.1-7.8-9-15.4-6.2-8 49 6.6 15.9-4.8 1.7 1.3 17.8 9.8 2-4.5 3-2 8.6-1.1 12.5-5.1 3.2 0.2 9.6 6 2.4 2.2 4.8 6.2 3.1 2.9 4.1 2.8 7 0.8 8.8-1 17.6-5.7 6.9-5.1 3.7-4.7 2.1-5.8 3.3-2.4 2.8 0.1 3.1 2 5 6.3 5.2 4.9 4.2 3.1 14.8 1.1z" id="ALB1494" name="Tirane">
    </path>
</a>

this is one of around 12 paths i have tried quite a few tricks but im interested if someone has tried to do something of this nature and how of course.
Any help will be appreciated.

i tried a few ways with javascript also with just straight up text and positioning them with % but is appears to be to much work because id have to do to many specific res media queries

Repeated delay for debounce hook

I’m working on a react hook to debounce search input requests. Please see my code below:

import { useEffect, useMemo, useRef } from "react";
import { debounce } from "lodash";

export const useDebounce = (cb, delay) => {
  const ref = useRef();

  useEffect(() => {
    ref.current = cb;
  }, [cb]);

  const dbc = useMemo(() => {
    const func = () => {
      ref.current?.();
    };
    return debounce(func, delay);
  }, []);

  return dbc;
};

The code works perfectly but I want to implement repeated delays for 5 secs. I modified the code as follows:

import { useEffect, useRef } from "react";

export const useDebounce = (cb) => {
  const ref = useRef();

  useEffect(() => {
    ref.current = cb;
  }, [cb]);

  useEffect(() => {
    const intervalId = setInterval(() => {
      ref.current?.();
    }, 5000);

    return () => {
      clearInterval(intervalId);
    };
  }, []);

  return cb;
};

I’m thinking there might be a better way to introduce repeated delays. I’ll appreciate suggestions. Thanks in advance

rxjs timer not waiting

I have a rxjs queue that supports 2 different types of tasks. For the title task I tried to create a sub-queue for each title. At the end, a timer is started.

export const queue$ = new Subject<Task>();
export const taskResult$ = new Subject<TaskResult>();
export const cancelTitleTimer$ = new Subject<void>();

const [titleTasks$, scanTasks$] = partition(
  queue$,
  (task): task is Extract<Task, { type: TaskType.TITLE }> =>
    task.type === TaskType.TITLE
);

const title$ = titleTasks$.pipe(
  groupBy(({ title }) => title),
  mergeMap((group$) =>
    group$.pipe(
      concatMap((task) =>
        defer(() => from(title(task))).pipe(
          map(
            () =>
              ({
                success: true,
                error: undefined,
                ...task,
              } satisfies TaskResult)
          ),
          catchError((error) =>
            of({ success: false, error, ...task } satisfies TaskResult)
          ),
          tap((taskResult) => {
            taskResult$.next(taskResult);
          }),
          switchMap((taskResult) =>
            race(
              timer(taskResult.success ? task.ttl * 1000 : 0),
              cancelTitleTimer$
            ).pipe(switchMap(() => of(taskResult)))
          )
        )
      )
    )
  )
);

merge(title$).subscribe((taskResult) => {
  if (taskResult.success) {
    return taskResult.logger.info(`Successfully finished: ${taskResult.type}.`);
  }

  taskResult.logger.error(`Failed ${taskResult.type}. ${taskResult.error}`);
});

When I call queue$.next, 2 times, the second time it does seem to wait for the timer of the previous one. How can I make sure that happens?

Why unused import fixes the issue with content loading

My project is quite large and I cannot share it for obvious reasons. Project is not even hosted remotely, I only have local server serving me index.html file. Server is made with Express.

Slightly simplified, a project is structured like so:

 - views
   - view1.js
   - view2.js
   - view3.js
 - index.html
 - services
   - script1.js
   - script2.js
   - script3.js
   - router.js
 - styles
   - style1.css
   - style2.css
 - server.js

Project is run as SPA.

When I start the server and the application is loaded, DOMContentLoaded event listener is never fired from the script3.js file unless I specify any arbitrary unused import inside e.g. script1.js file, e.g. import { someFunction } from "../../somescript.js". I am quite sure I don’t have any circular dependencies. Any time I omit import, application doesn’t load as expected. Anytime I include the import (tried with different imports from totally different scripts), it always works. Keep in mind import is never actually used inside the script, but for some reason it makes my application load properly.

Does anyone have any ideas? Is there some ES6 module detail I am not aware?

Conditionnally hide scrollbar in svelte

It is kinda easy. I replaced the normal scrollbar with a custom one and want to hide it only when I’m not actively scrolling. I was so thinking about conditional CSS but can’t succeed to anything.

The issue is mostly since I use svelte and not sveltekit to apply to the whole body I use the “:global(body)” things. It seems to make my whole kinda strange.

Also I have an animation with shapes on the background that need to be still there. Most of my attempts have broke it sadly.

Would any of you have an idea ?

Here is my code :

<script>
  import { onMount } from "svelte";
  import { fade } from "svelte/transition";
  import Header from "../components/header.svelte"
  import CenterBlock from "../components/centerBlock.svelte";
  import { linear } from "svelte/easing";

  let animate = false

  let shapes = 
  [
    { top: 50, left: 50, deltaX: -1, deltaY: 1 },
    { top: 350, left: 1000, deltaX: -1, deltaY: 1 },
    { top: 200, left: 500, deltaX: -1, deltaY: 1 },
    { top: 650, left: 1100, deltaX: -1, deltaY: 1 },
  ];

  function updateShapes() 
  {
    shapes = shapes.map(shape => 
    {
      let newTop = shape.top + shape.deltaY;
      let newLeft = shape.left + shape.deltaX;
      let shapeRadius = 300; // taille des shapes

      if (newTop <= 0 || newTop  >= window.innerHeight - shapeRadius) 
      {
        shape.deltaY = -shape.deltaY;
      }

      if (newLeft <= 0 || newLeft >= window.innerWidth - shapeRadius) 
      {
        shape.deltaX = -shape.deltaX;
      }

      let updatedShape = 
      {
        top: shape.top + shape.deltaY,
        left: shape.left + shape.deltaX,
        deltaX: shape.deltaX,
        deltaY: shape.deltaY,
      };

      return updatedShape;
    });

    requestAnimationFrame(updateShapes);
  }

  onMount(() => 
  {
    updateShapes();
    animate = true
  });

</script>

{#if animate}
  <div transition:fade={{delay: 250, duration: 1000, easing: linear}}>
    <Header/>
  </div>

  <div id="background" transition:fade={{delay:500, duration:5000, easing: linear}}>
    {#each shapes as shape (shape)}
    <div class="shape" style={`top: ${shape.top}px; left: ${shape.left}px;`}></div>
    {/each}
  </div>

  <CenterBlock/>

  <div style="height: 200vh;"></div>
{/if}
  



<style>
  @import '../css/gambetta.css';
  :global(body) 
  {
    margin: 0;
    background-color: #151813;
  }

  #background 
  {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
  }

  .shape 
  {
    position: absolute;
    width: 300px;
    height: 300px;
    opacity: 0.5;
    background: radial-gradient(circle, #730d23 40%, transparent 75%);
    filter: blur(30px);
  }

  /* width */
  :root::-webkit-scrollbar 
  {
  width: 10px;
  }

  /* Track */
  :root::-webkit-scrollbar-track 
  {
  background: #151813;
  border-radius: 5px;
  }

  /* Handle */
  :root::-webkit-scrollbar-thumb 
  {
  background: #730d23;
  border-radius: 10px;
  }

  /* Handle on hover */
  :root::-webkit-scrollbar-thumb:hover 
  {
  background: #400a15;
  }
</style>

How do I make an image pop up after the user enters in a prompt and presses OK [closed]

I am making a big adventure map, and I need to make some images pop up after the user answers the prompts given. I have no idea what I am doing, and can’t get a start on it.

I have tried multiple things and asked many people, but no one is able to help me. I only have 3 months of coding experience. I want an image to pop up when the user answers a prompt.

Blank Page even after successfully deploying on Firebase

Successfully deployed the project on firebase but on clicking the provided URL a blank page appears.
index.html

folders and files

index.html is under public
but src folder in not under public.
src folder contains the assests and components of the project.
also there is no error in the console the project is working properly in the localhost without any error.

firebase.json file:

{
  "hosting": {
    "public": "public",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  }
}

Package.json :

{
  "name": "poject_name",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@reduxjs/toolkit": "^1.9.5",
    "@tailwindcss/line-clamp": "^0.4.4",
    "@testing-library/jest-dom": "^5.14.1",
    "@testing-library/react": "^13.0.0",
    "@testing-library/user-event": "^13.2.1",
    "@types/jest": "^27.0.1",
    "@types/node": "^16.7.13",
    "@types/react": "^18.0.0",
    "@types/react-dom": "^18.0.0",
    "axios": "^1.4.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-icons": "^4.10.1",
    "react-infinite-scroll-component": "^6.1.0",
    "react-redux": "^8.1.2",
    "react-router-dom": "^6.14.2",
    "react-scripts": "5.0.1",
    "typescript": "^4.4.2",
    "web-vitals": "^2.1.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "autoprefixer": "^10.4.14",
    "init": "^0.1.2",
    "postcss": "^8.4.27",
    "tailwindcss": "^3.3.3"
  }
}

Adding a Stagger Effect Entrance Animation to a Heading using Gsap in Elementor

I need some help with animating a heading text in Elementor. Specifically, I want to create an entrance animation where each letter slides in from the bottom one by one, creating a staggered effect. Can you guide me on how to achieve this? Thanks in advance!

I tried the code below and it worked only when the page loads. How do I get it to work only when a part of the heading text is visible on the users screen?

<style>
.char {
    transform: translateY(200px);
    transition: transform .8s ;
}

</style>

<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.4.0/gsap.min.js"></script>
<script src="https://unpkg.com/split-type"></script>

<script>
       const myText = new SplitType('h1')

        gsap.to('.char', {
            y: 0,
            stagger: 0.02,
            delay: 0.5,
            duration: .1,
           
        })
 
</script>

JS “Google form to discord channel” problem

I encountered a problem with the code for sending Google forms via a webhook to a discord channel. Each response in the form requires a specific tag in the message, but when I found part of this code on the Internet, messages after submitting the form stopped going through altogether. Help, what needs to be done? I’m even worse than a beginner, this is my first time doing something like this and I can’t figure it out. Thank you in advance.

Here’s the code itself:

const POST_URL = "https://discord.com/api/webhooks/1183408138548944986/hASQpt-8i2KnihhG862PcjwziempEKaplxnvsgNnehaWkK3tSCdG_K3oo0tgMJClYTuJ";

const USERNAME = "Заявка на перевод между отделами"; 
const AVATAR_URL = "https://cdn.discordapp.com/attachments/1162425492272595066/1183438920894120047/d80ca90e11aec5f4c324ec7445a1fd12f8209b14_512.png"; 
const CONTENT = "<@&1123258457349431387> Поступила новая заявка на перевод."; 
const COLOR = 6017436; // Цвета тут: https://www.spycolor.com const TITLE = ""; 
const FOOTER = "Автор формы: Kiba Fubuyama"; const TIMESTAMP = true;

function onSubmit(e) { const response = e.response.getItemResponses(); let items = [];
for (const responseAnswer of response) {
    const question = responseAnswer.getItem().getTitle();
    const answer = responseAnswer.getResponse();
    let parts = []

    try {
        parts = answer.match(/[sS]{1,1024}/g) || [];
    } catch (e) {
        parts = answer;
    }

    if (!answer) {
        continue;
    }

    for (const [index, part] of Object.entries(parts)) {
        if (index == 0) {
            items.push({
                "name": question,
                "value": part,
                "inline": false
            });
        } else {
            items.push({
                "name": question.concat(" (cont.)"),
                "value": part,
                "inline": false
            });
        }
        for (var i = 0; i < response.length; i++) {
          const question = response[i].getItem().getTitle(), answer = response[i].getResponse();
          if (answer == "") continue;
          items.push({ "name": question, "value": answer });

          if (answer.includes('SED')) {
          const roleId = answer.split('SED')[1];
          mention += "<@&704605675476746320>" ;
    }
          if (answer.includes('PAB')) {
          const roleId = answer.split('PAB')[1];
          mention += "<@&704606021070618626>" ;
    }
         if (answer.includes('CPB')) {
         const roleId = answer.split('CPB')[1];
         mention += "<@&704606020651057203>" ;
   }
         if (answer.includes('IAD')) {
          const roleId = answer.split('IAD')[1];
         mention += "<@&1117845843702198354>" ;
    }
  }
}
var TIME = "";
if (TIMESTAMP) {
  TIME = new Date().toISOString();
}
    }
var options = {
    "method": "post",
    "headers": {
        "Content-Type": "application/json",
    },
    "payload": JSON.stringify({
        "content": CONTENT,
        "embeds": [{
            "title": TITLE,
            "color": COLOR,
            "fields": items,
            "footer": {
                "text": FOOTER
            },
            "timestamp": TIME
        }],
        username: USERNAME,
        avatar_url: AVATAR_URL,
    })
};

UrlFetchApp.fetch(POST_URL, options);

};

The web permissions API revoke() method is deprecated; what is the best way to revoke a permission such as ‘geolocation’?

I am building a web interface which checks if the permission to use geolocation has already been granted using:

navigator.permissions.query({name:'geolocation'}).then(function(result) {
  if (result.state == 'prompt') {
    // Ask user for permission to use geolocation.
  }
}

I’d like to provide my development team with a “revokeGeolocationPermission()” function which they can use to simulate the case where a user has never given permission, to see how the system reacts. This is meant to be used during development and QA.

The MDN Web Docs page Permissions: revoke() method describes exactly the functionality I need, but says:

This feature is no longer recommended [and] may cease to work at any time

What is the recommended way to revoke permissions such as geolocation for testing and QA purposes?

Electron Squirrel Auto Updater The remote server returned an error: (308) Permanent Redirect

I was trying to make an auto-updater for my electron app and used Hazel as the update server, but when I tried this and tested it, following every step on the electron guide, It would always give me these errors in the Squirrel-CheckForUpdate.log file:

[10/12/23 11:54:19] info: FileDownloader: Downloading url: https://cbsh-updater.vercel.app//update/win32/1.0.2/releases?id=bellschedoverlay&localversion=1.0.2&arch=amd64
[10/12/23 11:54:19] warn: IEnableLogger: Failed to download url: https://cbsh-updater.vercel.app//update/win32/1.0.2/releases?id=bellschedoverlay&localversion=1.0.2&arch=amd64: System.Net.WebException: The remote server returned an error: (308) Permanent Redirect.
[10/12/23 11:54:19] info: CheckForUpdateImpl: Download resulted in WebException (returning blank release list): System.Net.WebException: The remote server returned an error: (308) Permanent Redirect.
[10/12/23 11:54:19] fatal: Finished with unhandled exception: System.AggregateException: One or more errors occurred. ---> System.Net.WebException: The remote server returned an error: (308) Permanent Redirect.

These errors come with stacktraces in between, which is why I separated them.

Here is my code:

function checkForUpdates() {
  if (app.isPackaged){
    const server = config.hazelUpdateURL;
    const url = `${server}/update/${process.platform}/${app.getVersion()}`;

    autoUpdater.setFeedURL({ url });

    autoUpdater.checkForUpdates();
    
  }
}


autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {

dialog.showMessageBox({
    type: 'info',
    buttons: ['Restart', 'Later'],
    title: 'Application Update',
    message: process.platform === 'win32' ? releaseNotes : releaseName,
    detail:
      'A new version of the Crooms Bell Schedule has been downloaded. Restart the application to apply the updates.'
  }).then((returnValue) => {
    if (returnValue.response === 0) autoUpdater.quitAndInstall()
  });

})

autoUpdater.on('error', (message) => {
  console.error('There was a problem updating the application');
  console.error(message);
});

checkForUpdates();

I tried the url it failed to download from in a browser, and it downloaded the RELEASES file successfully with the expected content, but does show a 308 status code in the networking tab of devtools.

How do I ignore this error and force it to download the RELEASES file even if it is a redirect?