Skip to content

Commit

Permalink
Update innsida-search.user.js
Browse files Browse the repository at this point in the history
Mac-støtte for shortcuts
  • Loading branch information
marvik authored and GitHub Enterprise committed Feb 3, 2025
1 parent 6301c3f commit fd9900d
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,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/*
Expand Down Expand Up @@ -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();
Expand All @@ -49,4 +49,4 @@
inputBox.addEventListener('blur', function() {
inputBox.style.display = 'none';
});
})();
})();

0 comments on commit fd9900d

Please sign in to comment.