From 089728bc2fe547a811e02a3366a9774918423e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Andreas=20Nilsen?= Date: Mon, 19 Aug 2024 13:43:59 +0200 Subject: [PATCH] alt+\ to search on innsida --- 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 ad4b061..ad42e89 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 -// @description Show a textbox on "/" key press and redirect to Innsida search on Enter key press. +// @version 1.0.1 +// @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.key === '/') { + if (event.altKey && event.key === '/') { event.preventDefault(); inputBox.style.display = 'block'; inputBox.focus();