-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8cc00b4
commit dbcfc8c
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// ==UserScript== | ||
// @name Query Microsoft Copilot | ||
// @namespace http://tampermonkey.net/ | ||
// @version 0.1 | ||
// @description Open a new tab to query Microsoft Copilot when 'Control + *' is pressed | ||
// @author Microsoft CoPilot | ||
// @match *://*/* | ||
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== | ||
// @grant none | ||
// ==/UserScript== | ||
|
||
(function() { | ||
'use strict'; | ||
|
||
// Function to handle keydown events | ||
function handleKeydown(event) { | ||
// Check if the pressed key is '*' and if the Control key is held down | ||
if (event.key === '*' && event.ctrlKey) { | ||
// Open a new tab to query Microsoft Copilot | ||
window.open('https://copilot.microsoft.com/query', '_blank'); | ||
} | ||
} | ||
|
||
// Add the event listener to the document | ||
document.addEventListener('keydown', handleKeydown, true); | ||
})(); |