Refactor MediaPlayer, adds login sound

Logingeluidje werkt waarschijnlijk bij niemand, maar leuke easter egg
This commit is contained in:
2024-02-23 12:00:07 +01:00
parent d73910ab02
commit 2c808c7703
8 changed files with 47 additions and 72 deletions
-13
View File
@@ -25,20 +25,7 @@
</option>
{% endfor %}
</select>
<button id="wallpaper-reset" onclick="wallpaperChanged()">Reset</button>
</div>
{% endif %}
</form>
<script>
function wallpaperChanged() {
const expression = /^https?:\/\/.*\.(jpeg|jpg|png|gif)$/
const regex = new RegExp(expression)
val = document.getElementById("wallpaper").value
if(regex.test(val)) {
console.log(val)
localStorage.setItem("wallpaper", val);
setWallpaper()
}
}
</script>
{% endblock %}