Skip to content

Instantly share code, notes, and snippets.

@esedic
Created February 20, 2026 13:26
Show Gist options
  • Select an option

  • Save esedic/8a9b1d020e6fe9f597511b05d6a1c39a to your computer and use it in GitHub Desktop.

Select an option

Save esedic/8a9b1d020e6fe9f597511b05d6a1c39a to your computer and use it in GitHub Desktop.
hribi.net gallery arrow keys navigation Violentmonkey Script
// ==UserScript==
// @name hribi.net gallery arrow keys
// @namespace Violentmonkey Scripts
// @match https://www.hribi.net/*
// @grant none
// @version 1.0
// @author -
// @description 5/3/2025, 7:04:37 PM
// ==/UserScript==
const backButton = document.querySelector('.slikanazaj > a');
const forwardButton = document.querySelector('.slikanaprej > div:not(.slikanazaj2) > a');
document.addEventListener('keydown', function(event) {
if (event.key === 'ArrowLeft' && backButton) {
backButton.click();
} else if (event.key === 'ArrowRight' && forwardButton) {
forwardButton.click();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment