@abtasty/widget-utils
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var ready=function(e){"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},waitForElement=function(e,t,n,o){var r=0,a=0;try{document.querySelector(e)}catch(n){var c="[AB Tasty Widget] "+t+': selector "'+e+'" not valid.';return console.log(c),"function"==typeof o&&o(c)}r=setTimeout(function(){clearInterval(a);var n="[AB Tasty Widget] "+t+": can't find element \""+e+'".';return console.log(n),"function"==typeof o&&o(n)},1e4),a=setInterval(function(){if(null!==document.querySelector(e))return clearTimeout(r),clearInterval(a),"function"==typeof n&&n()},200)};exports.ready=ready,exports.waitForElement=waitForElement; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var log=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];e.unshift("[AB Tasty Widget] "+PACKAGE+":"),console.log.apply(console,e)},ready=function(e){"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},waitForElement=function(e,t,o,n){var r=0,l=0;try{document.querySelector(e)}catch(o){var a="[AB Tasty Widget] "+t+': selector "'+e+'" not valid.';return console.log(a),"function"==typeof n&&n(a)}r=setTimeout(function(){clearInterval(l);var o="[AB Tasty Widget] "+t+": can't find element \""+e+'".';return console.log(o),"function"==typeof n&&n(o)},1e4),l=setInterval(function(){if(null!==document.querySelector(e))return clearTimeout(r),clearInterval(l),"function"==typeof o&&o()},200)};exports.log=log,exports.ready=ready,exports.waitForElement=waitForElement; |
@@ -1,1 +0,1 @@ | ||
var ready=function(e){"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},waitForElement=function(e,t,n,o){var r=0,a=0;try{document.querySelector(e)}catch(n){var c="[AB Tasty Widget] "+t+': selector "'+e+'" not valid.';return console.log(c),"function"==typeof o&&o(c)}r=setTimeout(function(){clearInterval(a);var n="[AB Tasty Widget] "+t+": can't find element \""+e+'".';return console.log(n),"function"==typeof o&&o(n)},1e4),a=setInterval(function(){if(null!==document.querySelector(e))return clearTimeout(r),clearInterval(a),"function"==typeof n&&n()},200)};export{ready,waitForElement}; | ||
var log=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];e.unshift("[AB Tasty Widget] "+PACKAGE+":"),console.log.apply(console,e)},ready=function(e){"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},waitForElement=function(e,t,n,o){var r=0,a=0;try{document.querySelector(e)}catch(n){var l="[AB Tasty Widget] "+t+': selector "'+e+'" not valid.';return console.log(l),"function"==typeof o&&o(l)}r=setTimeout(function(){clearInterval(a);var n="[AB Tasty Widget] "+t+": can't find element \""+e+'".';return console.log(n),"function"==typeof o&&o(n)},1e4),a=setInterval(function(){if(null!==document.querySelector(e))return clearTimeout(r),clearInterval(a),"function"==typeof n&&n()},200)};export{log,ready,waitForElement}; |
{ | ||
"name": "@abtasty/widget-utils", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"main": "dist/widget-utils.cjs.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/widget-utils.esm.js", |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2846
7