-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
Enhancement Description
Add a keyboard shortcut to enhance usability by allowing lazy users to instantly open the top link in a new window without leaving the keyboard.
Especially useful, when there's only one row left after filtering by typing.
Proposed Behavior
- Shortcut: Alt + Enter
- Action: Opens the first link of table
Quick and dirty UserScript implementation:
// ==UserScript==
// @name Quick Open Top Link
// @namespace Violentmonkey Scripts
// @match https://cmd.ms/*
// @description Opens the top search/filter result link in a new window using Alt + Enter
// @grant none
// @version 0.1
// ==/UserScript==
(function () {
'use strict';
document.addEventListener('keydown', function (e) {
// Check for Alt + Enter
if (e.altKey && e.key === 'Enter') {
// this selector will break, if the classes are changed in the future, but this is just a Proof of Concept.
const links = document.querySelectorAll("td.commands-data-table.left.col-url > a");
if (links.length > 0) {
const topLink = links[0].href;
window.open(topLink, '_blank');
}
}
});
})();Metadata
Metadata
Assignees
Labels
No labels