Created
April 18, 2023 15:47
-
-
Save b-nnett/2749adb44566239e4c85ad1a8937c2bc to your computer and use it in GitHub Desktop.
Arc ChatGPT Boost
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
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
async function fillQuery() { | |
question = window.location.search.split("=")[1].replace("+", " ").replace("%3F", "?").replace("%27", "'") | |
var input = document.getElementsByTagName("textarea")[0] | |
await sleep(1000); // Pause for 1 second | |
input.textContent = question | |
// input.innerText = question | |
// console.log("filled!") | |
submit = document.getElementsByClassName("absolute p-1 rounded-md text-gray-500 bottom-1.5 md:bottom-2.5 hover:bg-gray-100 enabled:dark:hover:text-gray-400 dark:hover:bg-gray-900 disabled:hover:bg-transparent dark:disabled:hover:bg-transparent right-1 md:right-2 disabled:opacity-40")[0] | |
submit.disabled = false | |
submit.click() | |
} | |
fillQuery() |
How can it be used in Arc?
@federicoschermi To create a Boost, paste arc://boost/new
in Arc
@federicoschermi To create a Boost, paste
arc://boost/new
in Arc
Thank you!
Hey, I created the boost but I still don't have the direct search in Arc with cmd + T 😭
Thanks for this solution!
I tweaked it a bit, so only question
is used as the variable. I got rid of manual URL decoding by utilizing the native URL
class and searchParams
.
Problems occurred when a language model was set with your solution.
If you'd like, you can copy my changes of my fork to your gist.
https://gist.github.com/radermacher/8b8e98a01cd131257428075887f87492
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@b-nnett just tried this in my browser — looks like line 6 caused it to search for the utm parameter 😂