Skip to content

Instantly share code, notes, and snippets.

@b-nnett
Created April 18, 2023 15:47
Show Gist options
  • Save b-nnett/2749adb44566239e4c85ad1a8937c2bc to your computer and use it in GitHub Desktop.
Save b-nnett/2749adb44566239e4c85ad1a8937c2bc to your computer and use it in GitHub Desktop.
Arc ChatGPT Boost
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()
@federicoschermi
Copy link

@federicoschermi To create a Boost, paste arc://boost/new in Arc

Thank you!

@lucasFR77
Copy link

Hey, I created the boost but I still don't have the direct search in Arc with cmd + T 😭

@radermacher
Copy link

radermacher commented Apr 23, 2023

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