This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const submit = document.querySelector("#submit"); | |
const honeypot = document.querySelector("#work-email"); | |
honeypot.oninput = function () { | |
if (honeypot.value.length > 0) { | |
submit.disabled = true; | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.business { | |
position: absolute; | |
left: 0%; | |
top: 0%; | |
right: auto; | |
bottom: auto; | |
z-index: -1; | |
overflow: hidden; | |
width: 0px; | |
height: 0px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const config = input.config({ | |
title: "Script Settings", | |
items: [ | |
input.config.text("webflowAPI", { | |
label: "Webflow API Key", | |
}), | |
input.config.text("collectionID", { | |
label: "Collection ID", | |
}), | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://player.vimeo.com/api/player.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// On document ready, let's fetch some data | |
window.addEventListener("DOMContentLoaded", (event) => { | |
const handleError = (response) => { | |
if (!response.ok) { | |
throw Error(` ${response.status} ${response.statusText}`); | |
} else { | |
return response.json(); | |
} | |
}; //handler function that throws any encountered error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function writeJobs() { | |
jobIds.forEach((jobId) => { | |
const handleError = (response) => { | |
if (!response.ok) { | |
throw Error(` ${response.status} ${response.statusText}`); | |
} else { | |
return response.json(); | |
} | |
}; | |
fetch( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Triggers when the DOM is ready | |
window.addEventListener("DOMContentLoaded", (event) => { | |
const handleError = (response) => { | |
if (!response.ok) { | |
throw Error(` ${response.status} ${response.statusText}`); | |
} else { | |
return response.json(); | |
} | |
}; | |
fetch( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const jobIds = []; | |
const root = document.getElementById("root"); | |
const loading = document.getElementById("loading"); | |
const jobFilter = document.getElementById("filter"); | |
const errorWrapper = document.getElementById("errwrapper"); | |
const errorText = document.getElementById("errtext"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Also include the Vimeo API on your page | |
// <script src="https://player.vimeo.com/api/player.js"></script> | |
let playButton = document.getElementById("btnPlay"); | |
let pauseButton = document.getElementById("btnPause"); | |
let iframe = document.querySelector('iframe'); | |
let player = new Vimeo.Player(iframe); | |
playButton.onclick = (e) => { | |
player.play(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Global variables defined here | |
const jobIds = []; | |
const root = document.getElementById("root"); | |
const loading = document.getElementById("loading"); | |
const jobFilter = document.getElementById("filter"); | |
const errorWrapper = document.getElementById("errwrapper"); | |
const errorText = document.getElementById("errtext"); | |
// Filtering function for select element | |
jobFilter.onchange = function () { |