New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@abtasty/widget-utils

Package Overview
Dependencies
Maintainers
14
Versions
215
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abtasty/widget-utils - npm Package Compare versions

Comparing version 1.11.3 to 1.12.0

2

dist/widget-utils.cjs.js

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

"use strict";function preventGlobalScroll(){var e=document.querySelector("body");originalBodyScroll=window.getComputedStyle(e).overflowY,e.style.overflowY="hidden"}function allowGlobalScroll(){if(originalBodyScroll){document.querySelector("body").style.overflowY=originalBodyScroll}}Object.defineProperty(exports,"__esModule",{value:!0});var originalBodyScroll,exitIntent=function(e){var t,o=0;document.addEventListener("mousemove",function(e){o=e.clientY}),document.body.addEventListener("mouseleave",function n(r){r.clientY<=50&&(o=0,clearInterval(t),t=setTimeout(function(){0===o&&(e(),document.removeEventListener("mouseleave",n))},0))},!1)},log=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];e.unshift("[AB Tasty Widget] "+PACKAGE+":"),console.log.apply(console,e)},domReady=function(e){"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},waitForElement=function(e,t,o){var n=0,r=0;try{document.querySelector(e)}catch(t){var l='Selector "'+e+'" not valid.';return log(l),"function"==typeof o&&o(l)}n=setTimeout(function(){clearInterval(r);var t="Can't find element \""+e+'".';return log(t),"function"==typeof o&&o(t)},1e4),r=setInterval(function(){var o=document.querySelector(e);if(null!==o)return clearTimeout(n),clearInterval(r),"function"==typeof t&&t(o)},200)},getCookie=function(e){for(var t=e+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){for(var r=o[n];" "==r.charAt(0);)r=r.substring(1);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return""},getHostname=function(){var e=document.location.hostname.split("").reverse().join("");if(null===(e=e.match(/(?:[a-z]{2,4}\.[a-z]{2,3}|[a-z]{2,5})\.[a-z0-9\-]+(?:\.|$)/i)))e=document.location.hostname;else{"."!=e[0].substr(e[0].length-1)&&(e[0]+="."),e=e[0].split("").reverse().join("")}return e},setCookie=function(e,t,o){var n="";if(o){var r=new Date;r.setTime(r.getTime()+24*o*60*60*1e3),n="expires="+r.toUTCString()}var l="domain="+getHostname();document.cookie=e+"="+t+"; "+n+";"+l+";path=/"};exports.preventGlobalScroll=preventGlobalScroll,exports.allowGlobalScroll=allowGlobalScroll,exports.exitIntent=exitIntent,exports.log=log,exports.domReady=domReady,exports.waitForElement=waitForElement,exports.getCookie=getCookie,exports.getHostname=getHostname,exports.setCookie=setCookie;
"use strict";var originalBodyScroll;function preventGlobalScroll(){var e=document.querySelector("body");originalBodyScroll=window.getComputedStyle(e).overflowY,e.style.overflowY="hidden"}function allowGlobalScroll(){originalBodyScroll&&(document.querySelector("body").style.overflowY=originalBodyScroll)}Object.defineProperty(exports,"__esModule",{value:!0});var loadImage=function(e){return new Promise(function(o,t){var n=new Image;n.onload=function(){o(n)},n.src=e,n.onerror=function(o){var n=new Error("Image "+e+" is not loaded.");t(n)}})},exitIntent=function(e){var o,t=0;document.addEventListener("mousemove",function(e){t=e.clientY}),document.body.addEventListener("mouseleave",function n(r){r.clientY<=50&&(t=0,clearInterval(o),o=setTimeout(function(){0===t&&(e(),document.removeEventListener("mouseleave",n))},0))},!1)},log=function(){for(var e=[],o=arguments.length;o--;)e[o]=arguments[o];e.unshift("[AB Tasty Widget] "+PACKAGE+":"),console.log.apply(console,e)},domReady=function(e){"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},waitForElement=function(e,o,t){var n,r=0;try{document.querySelector(e)}catch(o){var l='Selector "'+e+'" not valid.';return log(l),"function"==typeof t&&t(l)}n=setTimeout(function(){clearInterval(r);var o="Can't find element \""+e+'".';return log(o),"function"==typeof t&&t(o)},1e4),r=setInterval(function(){var t=document.querySelector(e);if(null!==t)return clearTimeout(n),clearInterval(r),"function"==typeof o&&o(t)},200)},getCookie=function(e){for(var o=e+"=",t=document.cookie.split(";"),n=0;n<t.length;n++){for(var r=t[n];" "==r.charAt(0);)r=r.substring(1);if(0===r.indexOf(o))return r.substring(o.length,r.length)}return""},getHostname=function(){var e=document.location.hostname.split("").reverse().join("");null===(e=e.match(/(?:[a-z]{2,4}\.[a-z]{2,3}|[a-z]{2,5})\.[a-z0-9\-]+(?:\.|$)/i))?e=document.location.hostname:("."!=e[0].substr(e[0].length-1)&&(e[0]+="."),e=e[0].split("").reverse().join(""));return e},setCookie=function(e,o,t){var n="";if(t){var r=new Date;r.setTime(r.getTime()+24*t*60*60*1e3),n="expires="+r.toUTCString()}var l="domain="+getHostname();document.cookie=e+"="+o+"; "+n+";"+l+";path=/"};exports.preventGlobalScroll=preventGlobalScroll,exports.allowGlobalScroll=allowGlobalScroll,exports.loadImage=loadImage,exports.exitIntent=exitIntent,exports.log=log,exports.domReady=domReady,exports.waitForElement=waitForElement,exports.getCookie=getCookie,exports.getHostname=getHostname,exports.setCookie=setCookie;

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

function preventGlobalScroll(){var e=document.querySelector("body");originalBodyScroll=window.getComputedStyle(e).overflowY,e.style.overflowY="hidden"}function allowGlobalScroll(){if(originalBodyScroll){document.querySelector("body").style.overflowY=originalBodyScroll}}var originalBodyScroll,exitIntent=function(e){var t,o=0;document.addEventListener("mousemove",function(e){o=e.clientY}),document.body.addEventListener("mouseleave",function n(l){l.clientY<=50&&(o=0,clearInterval(t),t=setTimeout(function(){0===o&&(e(),document.removeEventListener("mouseleave",n))},0))},!1)},log=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];e.unshift("[AB Tasty Widget] "+PACKAGE+":"),console.log.apply(console,e)},domReady=function(e){"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},waitForElement=function(e,t,o){var n=0,l=0;try{document.querySelector(e)}catch(t){var r='Selector "'+e+'" not valid.';return log(r),"function"==typeof o&&o(r)}n=setTimeout(function(){clearInterval(l);var t="Can't find element \""+e+'".';return log(t),"function"==typeof o&&o(t)},1e4),l=setInterval(function(){var o=document.querySelector(e);if(null!==o)return clearTimeout(n),clearInterval(l),"function"==typeof t&&t(o)},200)},getCookie=function(e){for(var t=e+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){for(var l=o[n];" "==l.charAt(0);)l=l.substring(1);if(0===l.indexOf(t))return l.substring(t.length,l.length)}return""},getHostname=function(){var e=document.location.hostname.split("").reverse().join("");if(null===(e=e.match(/(?:[a-z]{2,4}\.[a-z]{2,3}|[a-z]{2,5})\.[a-z0-9\-]+(?:\.|$)/i)))e=document.location.hostname;else{"."!=e[0].substr(e[0].length-1)&&(e[0]+="."),e=e[0].split("").reverse().join("")}return e},setCookie=function(e,t,o){var n="";if(o){var l=new Date;l.setTime(l.getTime()+24*o*60*60*1e3),n="expires="+l.toUTCString()}var r="domain="+getHostname();document.cookie=e+"="+t+"; "+n+";"+r+";path=/"};export{preventGlobalScroll,allowGlobalScroll,exitIntent,log,domReady,waitForElement,getCookie,getHostname,setCookie};
var originalBodyScroll;function preventGlobalScroll(){var e=document.querySelector("body");originalBodyScroll=window.getComputedStyle(e).overflowY,e.style.overflowY="hidden"}function allowGlobalScroll(){originalBodyScroll&&(document.querySelector("body").style.overflowY=originalBodyScroll)}var loadImage=function(e){return new Promise(function(o,t){var n=new Image;n.onload=function(){o(n)},n.src=e,n.onerror=function(o){var n=new Error("Image "+e+" is not loaded.");t(n)}})},exitIntent=function(e){var o,t=0;document.addEventListener("mousemove",function(e){t=e.clientY}),document.body.addEventListener("mouseleave",function n(r){r.clientY<=50&&(t=0,clearInterval(o),o=setTimeout(function(){0===t&&(e(),document.removeEventListener("mouseleave",n))},0))},!1)},log=function(){for(var e=[],o=arguments.length;o--;)e[o]=arguments[o];e.unshift("[AB Tasty Widget] "+PACKAGE+":"),console.log.apply(console,e)},domReady=function(e){"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},waitForElement=function(e,o,t){var n,r=0;try{document.querySelector(e)}catch(o){var l='Selector "'+e+'" not valid.';return log(l),"function"==typeof t&&t(l)}n=setTimeout(function(){clearInterval(r);var o="Can't find element \""+e+'".';return log(o),"function"==typeof t&&t(o)},1e4),r=setInterval(function(){var t=document.querySelector(e);if(null!==t)return clearTimeout(n),clearInterval(r),"function"==typeof o&&o(t)},200)},getCookie=function(e){for(var o=e+"=",t=document.cookie.split(";"),n=0;n<t.length;n++){for(var r=t[n];" "==r.charAt(0);)r=r.substring(1);if(0===r.indexOf(o))return r.substring(o.length,r.length)}return""},getHostname=function(){var e=document.location.hostname.split("").reverse().join("");null===(e=e.match(/(?:[a-z]{2,4}\.[a-z]{2,3}|[a-z]{2,5})\.[a-z0-9\-]+(?:\.|$)/i))?e=document.location.hostname:("."!=e[0].substr(e[0].length-1)&&(e[0]+="."),e=e[0].split("").reverse().join(""));return e},setCookie=function(e,o,t){var n="";if(t){var r=new Date;r.setTime(r.getTime()+24*t*60*60*1e3),n="expires="+r.toUTCString()}var l="domain="+getHostname();document.cookie=e+"="+o+"; "+n+";"+l+";path=/"};export{preventGlobalScroll,allowGlobalScroll,loadImage,exitIntent,log,domReady,waitForElement,getCookie,getHostname,setCookie};
{
"name": "@abtasty/widget-utils",
"version": "1.11.3",
"version": "1.12.0",
"main": "dist/widget-utils.cjs.js",

@@ -5,0 +5,0 @@ "module": "dist/widget-utils.esm.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