-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
129 additions
and
135 deletions.
There are no files selected for viewing
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
|
||
<script> | ||
// | ||
// Programmer: Craig Stuart Sapp <craig@ccrma.stanford.edu> | ||
// Creation Date: Thu Aug 21 12:59:01 PDT 2014 | ||
// Last Modified: Sun Oct 29 22:08:45 PDT 2023 | ||
// Filename: scripts-local.html | ||
// Web Address: http://josquin.stanford.edu/scripts-listners.html | ||
// Syntax: JavaScript 1.8/ECMAScript 5 | ||
// vim: ts=3:ft=javascript | ||
// | ||
// Description: Listeners for homepage. | ||
// | ||
|
||
let JRP = {}; | ||
|
||
|
||
////////////////////////////// | ||
// | ||
// Function called when document has finished loading: | ||
// | ||
|
||
document.addEventListener("DOMContentLoaded", function() { | ||
|
||
AUDIO = document.getElementById("audio"); | ||
AUDIO.addEventListener('ended', function(e) { | ||
AUDIO.pause(); | ||
var pauseelem = document.getElementById(AUDIOid); | ||
pauseelem.className = "play"; | ||
}, false); | ||
|
||
sessionStorage.removeItem('RECENTLYADDEDHTML'); | ||
|
||
let macroid = "AKfycbyeHfmyCHHgbY9X_UDMzW9xyRgqH0c7Ycp76NTW18mjZSnW_2umhgH2ZGDtxuwDot6mKw"; | ||
let url = `https://script.google.com/macros/s/${macroid}/exec`; | ||
url += "?sheet=works"; | ||
url += "&format=json"; | ||
fetch(url) | ||
.then(response => { | ||
if (response.ok) { | ||
return response.json(); | ||
} else { | ||
throw new Error("Request failed with status " + response.status); | ||
} | ||
}) | ||
.then(data => { | ||
JRP.WORKS = data; | ||
buildComposerSelect(JRP.WORKS); | ||
buildGenreSelect(JRP.WORKS); | ||
displayRandomExample(JRP.WORKS); | ||
displayRecentAdditions(7, JRP.WORKS); | ||
}) | ||
.catch(error => { | ||
console.error("Fetch error: " + error.message); | ||
}); | ||
|
||
}, false); | ||
|
||
|
||
</script> | ||
|
||
|
||
|
Oops, something went wrong.