aboutsummaryrefslogtreecommitdiff
path: root/src/docs-google-com-fix-forms/google_forms.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/docs-google-com-fix-forms/google_forms.js')
-rw-r--r--src/docs-google-com-fix-forms/google_forms.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/docs-google-com-fix-forms/google_forms.js b/src/docs-google-com-fix-forms/google_forms.js
index 4652426..73d6840 100644
--- a/src/docs-google-com-fix-forms/google_forms.js
+++ b/src/docs-google-com-fix-forms/google_forms.js
@@ -82,7 +82,19 @@ document.querySelectorAll('[jsname=LwH6nd]').forEach(n => n.remove());
/* Enable the form sumbission button (if any). */
for (const submit_but of document.querySelectorAll('[jsname=M2UYVd]'))
- submit_but.addEventListener("click", () => form.submit());
+ submit_but.addEventListener("click", () => {
+ /*
+ * hacktcha_completed() will be defined by google-forms-hacktcha.js but only
+ * if we have the actual captcha support enabled. It will return true if
+ * we're already authenticated.
+ */
+ if (typeof window.hacktcha_completed === "function") {
+ if (!window.hacktcha_completed())
+ return;
+ }
+
+ form.submit()
+ });
/* Enable the "next page" button (if any). */
function goToNext()
@@ -109,6 +121,5 @@ for (const warning of
* support dropdown inputs
* support "other" radio buttons and "other" checkbox buttons, in which the
user types text in addition to selecting the "other" box
- * support reCAPTCHA integration
* support displaying public analytics ("viewanalytics" instead of "viewform")
*/