Skip to content

Instantly share code, notes, and snippets.

@intrnl
Last active November 18, 2020 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save intrnl/bb2514e648af127b0410296c76acab25 to your computer and use it in GitHub Desktop.
Save intrnl/bb2514e648af127b0410296c76acab25 to your computer and use it in GitHub Desktop.
Creates Google Forms URL containing answers that have been filled
// A teacher told us to submit the same form multiple times as sort of memory strengthening.
// I don't like that though, so here's a script that creates a Forms URL that contains the answers I've already filled.
location.origin + location.pathname + '?' +
Array.from(document.querySelectorAll('input[name^="entry."]'))
.filter((el) => el.value)
.map((el) => `${el.name}=${encodeURIComponent(el.value)}`)
.join('&');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment