From ad6f1cadc2160d1a40673b0b4de085287af95e77 Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Sun, 11 Jun 2023 01:41:16 -0500 Subject: [PATCH] Fix broken download button --- fetch.js | 21 +++++++++++++++++++++ index.html | 33 +++++++++++++++++++-------------- 2 files changed, 40 insertions(+), 14 deletions(-) create mode 100644 fetch.js diff --git a/fetch.js b/fetch.js new file mode 100644 index 00000000..b9e218e2 --- /dev/null +++ b/fetch.js @@ -0,0 +1,21 @@ +async function getContentFromWebpage(url) { + try { + const response = await fetch(url); + if (!response.ok) { + throw new Error('Network response was not OK'); + } + const content = await response.text(); + return content; + } catch (error) { + console.error('Error:', error); + return null; + } + } + +function generateURL(version) { + const buildNumber = 'https://ci.plex.us.org/job/Scissors/job/' + version + '/lastBuild/buildNumber'; + getContentFromWebpage(buildNumber) + .then((content) => { + window.location.href = 'https://ci.plex.us.org/job/Scissors/job/' + version + '/' + content + '/artifact/build/libs/scissors-' + version + '-' + content + '.jar'; + }); +} \ No newline at end of file diff --git a/index.html b/index.html index aebb2608..fecb0948 100644 --- a/index.html +++ b/index.html @@ -5,14 +5,15 @@ Scissors - - + @@ -67,13 +68,12 @@
  • 1.17.1
  • + -
    - -
    @@ -81,12 +81,17 @@

    Scissors

    Minecraft server software oriented towards patching Creative Mode exploits.

    Latest version: 1.20

    -
    - -
    -
    Previous versions: 1.17.1, 1.18.2, 1.19.4
    +
    + + +