Skip to content

Commit

Permalink
Merge pull request #18 from marvik/main
Browse files Browse the repository at this point in the history
Patch for shortcuts on Mac

Seems to still work on windows. Goodie.
  • Loading branch information
on authored and GitHub Enterprise committed Feb 4, 2025
2 parents 0ed42d1 + 58f7836 commit 5513dee
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 5513dee

Please sign in to comment.