From fd9900d2cb0f9da89d39485e2b104214e16cf5e4 Mon Sep 17 00:00:00 2001 From: Sveinung Bergeton Marvik Date: Mon, 3 Feb 2025 14:21:51 +0100 Subject: [PATCH] Update innsida-search.user.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mac-støtte for shortcuts --- innsida-search.user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/innsida-search.user.js b/innsida-search.user.js index 40a064e..808c6da 100644 --- a/innsida-search.user.js +++ b/innsida-search.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Innsida - Quick Search // @namespace http://tampermonkey.net/ -// @version 1.0.3 +// @version 1.0.4 // @description `Alt` + `/` to search on Innsida // @author Øyvind Nilsen (on@ntnu.no) // @match https://innsida.ntnu.no/* @@ -29,7 +29,7 @@ // Show the input box when "/" is pressed document.addEventListener('keydown', function(event) { - if ((event.altKey || event.metaKey) && event.key === '/') { + if ((event.altKey || event.metaKey) && event.shiftKey && event.code === 'Digit7') { event.preventDefault(); inputBox.style.display = 'block'; inputBox.focus(); @@ -49,4 +49,4 @@ inputBox.addEventListener('blur', function() { inputBox.style.display = 'none'; }); -})(); \ No newline at end of file +})();