Skip to content

Commit

Permalink
Patch for shortcuts on Mac
Browse files Browse the repository at this point in the history
Patch for shortcuts on Mac
  • Loading branch information
marvik authored and GitHub Enterprise committed Feb 3, 2025
1 parent fd9900d commit 58f7836
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bas-search.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name BAS Quick Search
// @namespace http://tampermonkey.net/
// @version 1.4.3
// @version 1.4.4
// @description Show a textbox on `Alt` + `/` key press and redirect to Cereweb search on Enter key press. Supports group search with "g:" prefix and accounts if you use no prefix or "a:" prefix.
// @author Øyvind Nilsen (on@ntnu.no)
// @match https://bas.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 @@ -56,4 +56,4 @@
inputBox.addEventListener('blur', function() {
inputBox.style.display = 'none';
});
})();
})();

0 comments on commit 58f7836

Please sign in to comment.