v1.1.0-beta/Google Form Styler

This commit is contained in:
Ayushya Amitabh
2020-05-11 23:24:04 -04:00
parent 4dab2807dd
commit 3ba962794d
2 changed files with 24 additions and 1 deletions
+23
View File
@@ -0,0 +1,23 @@
// CREATED BY http://googleformrestyler.apixml.net/
(function (XHR) {
var open = XHR.prototype.open;
XHR.prototype.open = function (method, url, async, user, pass) {
this._url = url;
if (url.indexOf('gstatic.com') !== -1 || url.indexOf('docs.google.com') !== -1) {
url = 'http://googleformrestyler.apixml.net/corsProxy.aspx?base64Url=' + btoa(url);
}
open.call(this, method, url, async, user, pass);
};
})(XMLHttpRequest);
(function () {
var script =
document.currentScript ||
/*Polyfill*/ Array.prototype.slice.call(document.getElementsByTagName('script')).pop();
var URL = script.getAttribute('form');
var xhr = new XMLHttpRequest();
xhr.open('GET', URL);
xhr.onload = function () {
document.write(xhr.response);
};
xhr.send();
})();
+1 -1
View File
@@ -61,7 +61,7 @@
<section id="request" data-page="2"> <section id="request" data-page="2">
<div class="page"> <div class="page">
<script <script
src="http://googleformrestyler.apixml.net/GoogleFormStyler.js" src="./GoogleFormStyler.js"
form="https://docs.google.com/forms/d/e/1FAIpQLSfhGxX7rJ4gNEYuQsx_wgg0GJqJq9XRWlgbpMZCrK14iPyuZA/viewform?embedded=true" form="https://docs.google.com/forms/d/e/1FAIpQLSfhGxX7rJ4gNEYuQsx_wgg0GJqJq9XRWlgbpMZCrK14iPyuZA/viewform?embedded=true"
></script> ></script>