From 4b1d01fe5539254dd4d98a931d5e88f105c88201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Andreas=20Nilsen?= Date: Tue, 20 Aug 2024 13:42:32 +0200 Subject: [PATCH] hopefully made innsida-search compatible with mac --- 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 ad42e89..a92eca1 100644 --- a/innsida-search.user.js +++ b/innsida-search.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name Innsida Quick Search // @namespace http://tampermonkey.net/ -// @version 1.0.1 -// @description [alt] + "/" to search on Innsida +// @version 1.0.2 +// @description [alt] + "/" to search on Innsida // @author on@ntnu.no // @match https://innsida.ntnu.no/* // @grant none @@ -29,7 +29,7 @@ // Show the input box when "/" is pressed document.addEventListener('keydown', function(event) { - if (event.altKey && event.key === '/') { + if ((event.altKey || event.metaKey) && event.key === '/') { event.preventDefault(); inputBox.style.display = 'block'; inputBox.focus();