Comparing version 1.0.6 to 1.0.7
@@ -302,3 +302,8 @@ "use strict"; | ||
try { | ||
await navigator.clipboard.writeText(JSON.stringify(object, null, 4)); | ||
if (navigator.clipboard && window.isSecureContext) { | ||
await navigator.clipboard.writeText(JSON.stringify(object, null, 4)); | ||
} | ||
else { | ||
return showToast("copy function works only on secure connections. (localhost or https)"); | ||
} | ||
showToast("Request Coped."); | ||
@@ -325,3 +330,8 @@ } | ||
}; | ||
await navigator.clipboard.writeText(JSON.stringify(responseObj, null, 4)); | ||
if (navigator.clipboard && window.isSecureContext) { | ||
await navigator.clipboard.writeText(JSON.stringify(responseObj, null, 4)); | ||
} | ||
else { | ||
return showToast("copy function works only on secure connections. (localhost or https)"); | ||
} | ||
showToast("Response Coped."); | ||
@@ -328,0 +338,0 @@ } |
{ | ||
"name": "outport", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
@@ -325,3 +325,3 @@ // Element references | ||
let data: Record<string, any> | null = null; | ||
if (body instanceof FormData) { | ||
@@ -332,3 +332,3 @@ data = JSON.parse(convertFormBodyToJson(body, formBodyData)); | ||
} | ||
if (data) { | ||
@@ -342,3 +342,3 @@ bodyData = Object.entries(data).map(([key, value]) => ({ | ||
} | ||
const object = { | ||
@@ -359,4 +359,9 @@ path: url.origin + url.pathname, | ||
try { | ||
await navigator.clipboard.writeText(JSON.stringify(object, null, 4)) | ||
if (navigator.clipboard && window.isSecureContext) { | ||
await navigator.clipboard.writeText(JSON.stringify(object, null, 4)) | ||
} else { | ||
return showToast("copy function works only on secure connections. (localhost or https)"); | ||
} | ||
showToast("Request Coped."); | ||
@@ -387,3 +392,8 @@ } catch (err) { | ||
await navigator.clipboard.writeText(JSON.stringify(responseObj, null, 4)); | ||
if (navigator.clipboard && window.isSecureContext) { | ||
await navigator.clipboard.writeText(JSON.stringify(responseObj, null, 4)); | ||
} else { | ||
return showToast("copy function works only on secure connections. (localhost or https)"); | ||
} | ||
showToast("Response Coped."); | ||
@@ -390,0 +400,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
215359
4221