Skip to content

Patch for shortcuts on Mac #18

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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';
});
})();
})();