Skip to content

Commit

Permalink
alt+\ to search on innsida
Browse files Browse the repository at this point in the history
  • Loading branch information
on committed Aug 19, 2024
1 parent df28311 commit 089728b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions innsida-search.user.js
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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();
Expand Down

0 comments on commit 089728b

Please sign in to comment.