Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

okra-js

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

okra-js - npm Package Compare versions

Comparing version 2.0.6 to 2.0.7

2

dist/bundle.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(e.document)return t(e);throw new Error("Okra requires a window with a document")}:t(e)}("undefined"!=typeof window?window:this,function(a,e){var t={loader:null,iframe:null,baseUrl:"https://app.okra.ng",url:"",onSuccess:null,id:null,onClose:null,version:2,init:function(){var e=this;e.addOverlay(),e.setIframe(),e.listen()},removeFunctions:function(e){e=JSON.stringify(e);return JSON.parse(e)},buildWithShortUrl:function(e){var t=this,a=(t.id="okra-iframe-"+Math.floor(1e4*Math.random()),t.url=t.baseUrl+"/?&withOptions=true&isIframe=true",e);a.hideCardOnExit=!0,a.iframeData=!0,a.ref=e.short_url,a.source=e.source||"integration",a.withShortURL=!0,delete a.short_url,t.cleanObj=a,t.onSuccess=e&&e.onSuccess,t.onClose=e&&e.onClose,t.onError=e&&e.onError,t.beforeClose=e&&e.beforeClose,t.onEvent=e&&e.onEvent,t.init()},buildWithOptions:function(e){var t=this,a=(t.id="okra-iframe-"+Math.floor(1e4*Math.random()),e);a.env="production"===e.env?"production":"production-sandbox",a.source=e.source||"integration",a.hideCardOnExit=!0,a.iframeData=!0,a.withOptions=!0,t.cleanObj=a,t.url=t.baseUrl+"/?isIframe=true&withOptions=true",t.onSuccess=e&&e.onSuccess,t.onClose=e&&e.onClose,t.onError=e&&e.onError,t.beforeClose=e&&e.beforeClose,t.onEvent=e&&e.onEvent,t.init()},sendObj:function(e){var t=this,a=!1,n=document.getElementById(t.iframe.id);n&&n.contentWindow&&(n.contentWindow.postMessage(e,t.url),a=!0),n.onload=function(){a||n.contentWindow.postMessage(e,t.url)}},listen:function(){a.addEventListener("message",this)},handleEvent:function(e){var t=this;e.origin.startsWith(t.baseUrl)&&(e&&e.data&&e.data.close?(t.forceClose(t),t.onClose&&t.onClose()):e&&e.data&&e.data&&e.data.success?t.onSuccess&&t.onSuccess(e&&e.data):e&&e.data&&e.data&&e.data.error?t.onError&&t.onError(e&&e.data):e&&e.data&&e.data&&e.data.beforeClose?t.beforeClose&&t.beforeClose(e&&e.data):e&&e.data&&e.data.ifameLoaded?t.cleanObj&&(t.sendObj(t.removeFunctions(t.cleanObj)),t.removeOverlay(t)):e&&e.data&&e.data&&e.data.event&&t.onEvent&&t.onEvent(e&&e.data))},addOverlay:function(){var e=document.createElement("div");e.id="okra-base-"+Math.floor(1e4*Math.random()),e.style.cssText="background-color: rgba(98, 103, 109, 0.54); box-shadow: rgba(0, 0, 0, 0.16) 0px 0px 5px 3px; position: fixed;width: 100%; height: 100%; top: 0; left: 0; z-index: 9999999; overflow: hidden;";(this.loader=e).innerHTML='<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Okra Spinner</title> <style> .app-loader { margin: 200px 0; text-align: center; color: white; } @keyframes app-loader__spinner { 0% { opacity: 1; } 100% { opacity: 0; } } @-webkit-keyframes app-loader__spinner { 0% { opacity: 1; } 100% { opacity: 0; } } .app-loader__spinner { position: relative; display: inline-block; } .app-loader__spinner div { left: 95px; top: 35px; position: absolute; -webkit-animation: app-loader__spinner linear 1s infinite; animation: app-loader__spinner linear 1s infinite; background: white; width: 10px; height: 30px; border-radius: 40%; -webkit-transform-origin: 5px 65px; transform-origin: 5px 65px; } .app-loader__spinner div:nth-child(1) { -webkit-transform: rotate(0deg); transform: rotate(0deg); -webkit-animation-delay: -0.916666666666667s; animation-delay: -0.916666666666667s; } .app-loader__spinner div:nth-child(2) { -webkit-transform: rotate(30deg); transform: rotate(30deg); -webkit-animation-delay: -0.833333333333333s; animation-delay: -0.833333333333333s; } .app-loader__spinner div:nth-child(3) { -webkit-transform: rotate(60deg); transform: rotate(60deg); -webkit-animation-delay: -0.75s; animation-delay: -0.75s; } .app-loader__spinner div:nth-child(4) { -webkit-transform: rotate(90deg); transform: rotate(90deg); -webkit-animation-delay: -0.666666666666667s; animation-delay: -0.666666666666667s; } .app-loader__spinner div:nth-child(5) { -webkit-transform: rotate(120deg); transform: rotate(120deg); -webkit-animation-delay: -0.583333333333333s; animation-delay: -0.583333333333333s; } .app-loader__spinner div:nth-child(6) { -webkit-transform: rotate(150deg); transform: rotate(150deg); -webkit-animation-delay: -0.5s; animation-delay: -0.5s; } .app-loader__spinner div:nth-child(7) { -webkit-transform: rotate(180deg); transform: rotate(180deg); -webkit-animation-delay: -0.416666666666667s; animation-delay: -0.416666666666667s; } .app-loader__spinner div:nth-child(8) { -webkit-transform: rotate(210deg); transform: rotate(210deg); -webkit-animation-delay: -0.333333333333333s; animation-delay: -0.333333333333333s; } .app-loader__spinner div:nth-child(9) { -webkit-transform: rotate(240deg); transform: rotate(240deg); -webkit-animation-delay: -0.25s; animation-delay: -0.25s; } .app-loader__spinner div:nth-child(10) { -webkit-transform: rotate(270deg); transform: rotate(270deg); -webkit-animation-delay: -0.166666666666667s; animation-delay: -0.166666666666667s; } .app-loader__spinner div:nth-child(11) { -webkit-transform: rotate(300deg); transform: rotate(300deg); -webkit-animation-delay: -0.083333333333333s; animation-delay: -0.083333333333333s; } .app-loader__spinner div:nth-child(12) { -webkit-transform: rotate(330deg); transform: rotate(330deg); -webkit-animation-delay: 0s; animation-delay: 0s; } .app-loader__spinner { width: 40px; height: 40px; -webkit-transform: translate(-20px, -20px) scale(0.2) translate(20px, 20px); transform: translate(-20px, -20px) scale(0.2) translate(20px, 20px); } </style> </head> <body> <div id="app-loader" class="app-loader"> <div id="spinner" class="app-loader__spinner"> <div></div><div></div><div></div><div></div><div></div><div></div><div> </div><div></div><div></div><div></div><div></div><div></div> </div> </div> </body> </html>',document.body.appendChild(e)},removeOverlay:function(e){(e=e||this)&&e.loader&&e.loader.id&&(document.querySelector("#"+e.loader.id).outerHTML="")},setIframe:function(){var e=document.createElement("iframe");e.setAttribute("frameBorder","0"),e.setAttribute("allowtransparency","true"),e.id=this.id,e.name="okra-popup-"+e.id,e.style.cssText="z-index: 9999999999999999999999;background: transparent; border: 0px none transparent;overflow-x: hidden;overflow-y: hidden;margin: 0;padding: 0;-webkit-tap-highlight-color: transparent;-webkit-touch-callout: none;position: fixed;left: 0;top: 0;width: 100%;height: 100%;",e.src=this.url,this.iframe=e,document.body.appendChild(e)},closeIframe:function(e,t){var a;e&&e.outerHTML&&((a=e.previousSibling)&&t.iframe&&(t.iframe="",a.parentElement.removeChild(e)))},forceClose:function(e){var e=this.Okra||e,t=e.iframe;t&&e.closeIframe(t,e),a.removeEventListener("message",e)}},n=a.Okra;return t.noConflict=function(e){return e&&a.Okra===t&&(a.Okra=n),t},void 0===e&&(a.Okra=t),t});
!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(e.document)return t(e);throw new Error("Okra requires a window with a document")}:t(e)}("undefined"!=typeof window?window:this,function(a,e){var t={loader:null,iframe:null,baseUrl:"http://app.okra.ng",url:"",onSuccess:null,id:null,onClose:null,version:2,init:function(){var e=this;e.addOverlay(),e.setIframe(),e.listen()},removeFunctions:function(e){e=JSON.stringify(e);return JSON.parse(e)},buildWithShortUrl:function(e){var t=this,a=(t.id="okra-iframe-"+Math.floor(1e4*Math.random()),t.url=t.baseUrl+"/?&withOptions=true&isIframe=true",e);a.hideCardOnExit=!0,a.iframeData=!0,a.ref=e.short_url,a.source=e.source||"integration",a.withShortURL=!0,delete a.short_url,t.cleanObj=a,t.onSuccess=e&&e.onSuccess,t.onClose=e&&e.onClose,t.onError=e&&e.onError,t.beforeClose=e&&e.beforeClose,t.onEvent=e&&e.onEvent,t.init()},buildWithOptions:function(e){var t=this,a=(t.id="okra-iframe-"+Math.floor(1e4*Math.random()),e);a.env="production"===e.env?"production":"production-sandbox",a.source=e.source||"integration",a.hideCardOnExit=!0,a.iframeData=!0,a.withOptions=!0,t.cleanObj=a,t.url=t.baseUrl+"/?isIframe=true&withOptions=true",t.onSuccess=e&&e.onSuccess,t.onClose=e&&e.onClose,t.onError=e&&e.onError,t.beforeClose=e&&e.beforeClose,t.onEvent=e&&e.onEvent,t.init()},sendObj:function(e){var t=this,a=!1,n=document.getElementById(t.iframe.id);n&&n.contentWindow&&(n.contentWindow.postMessage(e,t.url),a=!0),n.onload=function(){a||n.contentWindow.postMessage(e,t.url)}},listen:function(){a.addEventListener("message",this)},handleEvent:function(e){var t=this;e.origin.startsWith(t.baseUrl)&&(e&&e.data&&e.data.close?(t.forceClose(t),t.onClose&&t.onClose()):e&&e.data&&e.data&&e.data.success?t.onSuccess&&t.onSuccess(e&&e.data):e&&e.data&&e.data&&e.data.error?t.onError&&t.onError(e&&e.data):e&&e.data&&e.data&&e.data.beforeClose?t.beforeClose&&t.beforeClose(e&&e.data):e&&e.data&&e.data.ifameLoaded?t.cleanObj&&(t.sendObj(t.removeFunctions(t.cleanObj)),t.removeOverlay(t)):e&&e.data&&e.data&&e.data.event&&t.onEvent&&t.onEvent(e&&e.data))},addOverlay:function(){var e=document.createElement("div");e.id="okra-base-"+Math.floor(1e4*Math.random()),e.style.cssText="background-color: rgba(98, 103, 109, 0.54); box-shadow: rgba(0, 0, 0, 0.16) 0px 0px 5px 3px; position: fixed;width: 100%; height: 100%; top: 0; left: 0; z-index: 9999999; overflow: hidden;";(this.loader=e).innerHTML='<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Okra Spinner</title> <style> .app-loader { margin: 200px 0; text-align: center; color: white; } @keyframes app-loader__spinner { 0% { opacity: 1; } 100% { opacity: 0; } } @-webkit-keyframes app-loader__spinner { 0% { opacity: 1; } 100% { opacity: 0; } } .app-loader__spinner { position: relative; display: inline-block; } .app-loader__spinner div { left: 95px; top: 35px; position: absolute; -webkit-animation: app-loader__spinner linear 1s infinite; animation: app-loader__spinner linear 1s infinite; background: white; width: 10px; height: 30px; border-radius: 40%; -webkit-transform-origin: 5px 65px; transform-origin: 5px 65px; } .app-loader__spinner div:nth-child(1) { -webkit-transform: rotate(0deg); transform: rotate(0deg); -webkit-animation-delay: -0.916666666666667s; animation-delay: -0.916666666666667s; } .app-loader__spinner div:nth-child(2) { -webkit-transform: rotate(30deg); transform: rotate(30deg); -webkit-animation-delay: -0.833333333333333s; animation-delay: -0.833333333333333s; } .app-loader__spinner div:nth-child(3) { -webkit-transform: rotate(60deg); transform: rotate(60deg); -webkit-animation-delay: -0.75s; animation-delay: -0.75s; } .app-loader__spinner div:nth-child(4) { -webkit-transform: rotate(90deg); transform: rotate(90deg); -webkit-animation-delay: -0.666666666666667s; animation-delay: -0.666666666666667s; } .app-loader__spinner div:nth-child(5) { -webkit-transform: rotate(120deg); transform: rotate(120deg); -webkit-animation-delay: -0.583333333333333s; animation-delay: -0.583333333333333s; } .app-loader__spinner div:nth-child(6) { -webkit-transform: rotate(150deg); transform: rotate(150deg); -webkit-animation-delay: -0.5s; animation-delay: -0.5s; } .app-loader__spinner div:nth-child(7) { -webkit-transform: rotate(180deg); transform: rotate(180deg); -webkit-animation-delay: -0.416666666666667s; animation-delay: -0.416666666666667s; } .app-loader__spinner div:nth-child(8) { -webkit-transform: rotate(210deg); transform: rotate(210deg); -webkit-animation-delay: -0.333333333333333s; animation-delay: -0.333333333333333s; } .app-loader__spinner div:nth-child(9) { -webkit-transform: rotate(240deg); transform: rotate(240deg); -webkit-animation-delay: -0.25s; animation-delay: -0.25s; } .app-loader__spinner div:nth-child(10) { -webkit-transform: rotate(270deg); transform: rotate(270deg); -webkit-animation-delay: -0.166666666666667s; animation-delay: -0.166666666666667s; } .app-loader__spinner div:nth-child(11) { -webkit-transform: rotate(300deg); transform: rotate(300deg); -webkit-animation-delay: -0.083333333333333s; animation-delay: -0.083333333333333s; } .app-loader__spinner div:nth-child(12) { -webkit-transform: rotate(330deg); transform: rotate(330deg); -webkit-animation-delay: 0s; animation-delay: 0s; } .app-loader__spinner { width: 40px; height: 40px; -webkit-transform: translate(-20px, -20px) scale(0.2) translate(20px, 20px); transform: translate(-20px, -20px) scale(0.2) translate(20px, 20px); } </style> </head> <body> <div id="app-loader" class="app-loader"> <div id="spinner" class="app-loader__spinner"> <div></div><div></div><div></div><div></div><div></div><div></div><div> </div><div></div><div></div><div></div><div></div><div></div> </div> </div> </body> </html>',document.body.appendChild(e)},removeOverlay:function(e){(e=e||this)&&e.loader&&e.loader.id&&(document.querySelector("#"+e.loader.id).outerHTML="")},setIframe:function(){var e=document.createElement("iframe");e.setAttribute("frameBorder","0"),e.setAttribute("allowtransparency","true"),e.id=this.id,e.name="okra-popup-"+e.id,e.style.cssText="z-index: 9999999999999999999999;background: transparent; border: 0px none transparent;overflow-x: hidden;overflow-y: hidden;margin: 0;padding: 0;-webkit-tap-highlight-color: transparent;-webkit-touch-callout: none;position: fixed;left: 0;top: 0;width: 100%;height: 100%;",e.src=this.url,this.iframe=e,document.body.appendChild(e)},closeIframe:function(e,t){var a;e&&e.outerHTML&&((a=e.previousSibling)&&t.iframe&&(t.iframe="",a.parentElement.removeChild(e)))},forceClose:function(e){var e=this.Okra||e,t=e.iframe;t&&e.closeIframe(t,e),a.removeEventListener("message",e)}},n=a.Okra;return t.noConflict=function(e){return e&&a.Okra===t&&(a.Okra=n),t},void 0===e&&(a.Okra=t),t});
{
"name": "okra-js",
"version": "2.0.6",
"version": "2.0.7",
"description": "JS library for implementing Okra widget",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc