Last active
January 6, 2021 15:01
-
-
Save mahpah/ad86062b10e1ccd3e0b56f9e5a498c98 to your computer and use it in GitHub Desktop.
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
<script> | |
function inject() { | |
var query = new URL(window.location); | |
var code = query.searchParams.get('code'); | |
if (!code) { | |
return; | |
} | |
var input = document.querySelector('input[placeholder="_ _ _ _ _ _ _ _ _ _ _ _ _ _ _"]'); | |
if (!input) { | |
return; | |
} | |
var inputSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set; | |
inputSetter.call(input, code); | |
} | |
inject(); | |
</script> |
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 inject() { | |
var query = new URL(window.location); | |
var code = query.searchParams.get('code'); | |
if (!code) { | |
return; | |
} | |
var input = document.querySelector('input[placeholder="_ _ _ _ _ _ _ _ _ _ _ _ _ _ _"]'); | |
if (!input) { | |
return; | |
} | |
var nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set; | |
nativeInputValueSetter.call(input, code); | |
} | |
inject(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment