Last active
February 6, 2024 15:05
-
-
Save effektsvk/7a732721b7e7903200ecb299a2ba3466 to your computer and use it in GitHub Desktop.
Arc Boost for opening a new thread in ChatGPT
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
document.addEventListener("keydown", function (event) { | |
// Check if Cmd (on Mac) or Ctrl (on other platforms) is pressed along with 'N' | |
if ((event.metaKey || event.ctrlKey) && event.key === "n") { | |
event.preventDefault(); // Prevent the default action to ensure it doesn't interfere | |
// Define the XPath of the element to click | |
var xpath = | |
"/html/body/div[1]/div[1]/div[1]/div/div/div/div/nav/div[2]/div[1]/div/a"; | |
// Use the XPath to find the element | |
var element = document.evaluate( | |
xpath, | |
document, | |
null, | |
XPathResult.FIRST_ORDERED_NODE_TYPE, | |
null, | |
).singleNodeValue; | |
// Simulate a click on the element if it exists | |
if (element) element.click(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just found out that you can use
Cmd + K
without boost 🤦♂️