Last active
May 27, 2021 14:24
-
-
Save harmoniemand/20b9786369c79fef3a0f5591ca59783e to your computer and use it in GitHub Desktop.
Jufo-Bundeswettbewerb-Arrow-Operation
This file contains hidden or 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
// Greasemonkey Script für die Jugendforscht PLattform 2021 | |
// Plugin: https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ | |
// ==UserScript== | |
// @name Jufo-Bundeswettbewerb-Arrow-Operation | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
window.addEventListener("keydown", event => { | |
const queryString = window.location.search; | |
const urlParams = new URLSearchParams(queryString); | |
const projectId = urlParams.get('bid') | |
if (event.isComposing || event.keyCode === 37) { | |
// previous | |
window.location.href = "https://jufo-buwe-event.experimenta.science/x/21/event.php?pg=messehalle&h=1&bid=" + (Number(projectId) - 1); | |
return; | |
} | |
if (event.isComposing || event.keyCode === 39) { | |
//next | |
window.location.href = "https://jufo-buwe-event.experimenta.science/x/21/event.php?pg=messehalle&h=1&bid=" + (Number(projectId) + 1); | |
return; | |
} | |
}); | |
// |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment