Last active
September 6, 2022 20:57
-
-
Save Dorifor/c9e4eca27b89a4bd9303fe9a273786d8 to your computer and use it in GitHub Desktop.
Adds cursed sounds to jpdb, don't thank me, shoutout to @Ōkami Amaterasu#1829 for chosing these lovely sounds.
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
// ==UserScript== | |
// @name JPDB Sounds | |
// @namespace jpdbsounds | |
// @description Adds cursed sounds to jpdb, don't thank me, shoutout to @Ōkami Amaterasu#1829 for chosing these lovely sounds. | |
// @include https://jpdb.io/review* | |
// @version 1.0.2 | |
// @author Mao#2071 | |
// @license MIT; http://opensource.org/licenses/MIT | |
// @require http://code.jquery.com/jquery-3.4.1.min.js | |
// @run-at document-end | |
// @grant none | |
// ==/UserScript== | |
$(document).ready(function () { | |
const links = { | |
"#grade-1": new Audio( | |
"https://github.com/Dorifor/jpdbsounds/raw/main/Quick_Reverb_Fart_-_Sound_Effect_HD.mp3" | |
), | |
"#grade-2": new Audio( | |
"https://github.com/Dorifor/jpdbsounds/raw/main/Lego_yoda_death_sound.mp3" | |
), | |
"#grade-3": new Audio( | |
"https://github.com/Dorifor/jpdbsounds/raw/main/shivering_dog_meme.mp3" | |
), | |
"#grade-4": new Audio( | |
"https://github.com/Dorifor/jpdbsounds/raw/main/tuting.mp3" | |
), | |
"#grade-5": new Audio( | |
"https://github.com/Dorifor/jpdbsounds/raw/main/Yeah_baby.mp3" | |
), | |
}; | |
links["#grade-4"].volume = 0.1; | |
document.querySelector("#show-answer").addEventListener("click", () => { | |
setTimeout(() => { | |
Object.keys(links).forEach((key) => { | |
console.log(key); | |
document.querySelector(key).addEventListener("click", (e) => { | |
e.preventDefault(); | |
links[key].addEventListener("ended", () => { | |
e.target.parentElement.submit(); | |
}); | |
links[key].play(); | |
}); | |
}); | |
}, 100); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment