Access to XMLHttpRequest at 'https://docs.google.com/forms/d/e/xxxx/formResponse' from origin 'https://test-cors.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
It basically seems like this script is no longer possible to work in modern browser due to CORS policies, and the fact that https://docs.google.com/forms doesnt have any CORS setup.
You can test to confirm by pasting any Google Form URL into https://www.test-cors.org/#?client_method=POST, and hitting Submit. Note: you need to open your JS console to see the error message.
This message indicates that responses from https://docs.google.com/forms/d/e/xxxx/formResponse URLs currently don’t include the Access-Control-Allow-Origin response header, so browsers won’t allow any JavaScript code to access the response.
The complete error message in JS console is:
It basically seems like this script is no longer possible to work in modern browser due to CORS policies, and the fact that https://docs.google.com/forms doesnt have any CORS setup.
You can test to confirm by pasting any Google Form URL into https://www.test-cors.org/#?client_method=POST, and hitting Submit. Note: you need to open your JS console to see the error message.
This message indicates that responses from https://docs.google.com/forms/d/e/xxxx/formResponse URLs currently don’t include the Access-Control-Allow-Origin response header, so browsers won’t allow any JavaScript code to access the response.