Last active
December 9, 2020 08:33
-
-
Save zetavg/fb2b820f5724805efe345f41864c959a to your computer and use it in GitHub Desktop.
Inject GraphQL Explorer on any webpage, good for hacking sites that uses cookies for GraphQL requests. Usage: copy the content of inject-graphiql.js, open Devtools on the target page and paste it into the JavaScript Console , modify "put_your_endpoint_here" and hit enter to execute.
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 injectGraphiQL(endpoint) { | |
window.GRAPHQL_ENDPOINT = endpoint; | |
var newScript = document.createElement('script'); | |
newScript.type = 'text/javascript'; | |
newScript.src = 'https://zetavg.github.io/github-page-for-hosting-things/js/graphiql-for-injection.js'; | |
document.body.innerHTML = ''; | |
document.getElementsByTagName('head')[0].appendChild(newScript); | |
} | |
injectGraphiQL(put_your_endpoint_here); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment