hapi-recaptcha-html 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/hapi.js +4 -4
package/package.json
CHANGED
package/src/hapi.js
CHANGED
|
@@ -72,7 +72,7 @@ function displayHapiformInformation(a) {
|
|
|
72
72
|
let endpoint = new URL(org_endpoint);
|
|
73
73
|
|
|
74
74
|
if (endpoint.host === "hapiform.sg") {
|
|
75
|
-
console.log("🚀 " + window.location.origin + a.redirectTo);
|
|
75
|
+
console.log("🚀 " + window.top.location.origin + a.redirectTo);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -103,7 +103,7 @@ async function verifyCaptcha(a) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
function integrationWebhook(config) {
|
|
106
|
-
if (window.location.hostname !== "localhost" && window.location.hostname !== "127.0.0.1") {
|
|
106
|
+
if (window.top.location.hostname !== "localhost" && window.top.location.hostname !== "127.0.0.1") {
|
|
107
107
|
axios(config).then((res) => {
|
|
108
108
|
}).catch((e) => {
|
|
109
109
|
console.error(e)
|
|
@@ -123,7 +123,7 @@ function onSubmission(config, a) {
|
|
|
123
123
|
// on success webhook end
|
|
124
124
|
|
|
125
125
|
if (a.redirectTo) {
|
|
126
|
-
window.location.href = a.redirectTo;
|
|
126
|
+
window.top.location.href = a.redirectTo;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
// Remove files from filepond
|
|
@@ -297,7 +297,7 @@ function dispatchEvent(eventName) {
|
|
|
297
297
|
function getEndpoint(endpoint) {
|
|
298
298
|
let url = new URL(endpoint);
|
|
299
299
|
|
|
300
|
-
if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
|
|
300
|
+
if (window.top.location.hostname === "localhost" || window.top.location.hostname === "127.0.0.1") {
|
|
301
301
|
url.searchParams.set("test", '1');
|
|
302
302
|
console.log('testing mode!')
|
|
303
303
|
}
|