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

@abtasty/interstitiel

Package Overview
Dependencies
Maintainers
14
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abtasty/interstitiel - npm Package Compare versions

Comparing version 0.0.8 to 2.0.2

dist/form.js

3

dist/main.js

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

!function(){"use strict";function i(){var i=!1;i=void 0!==window.top.ABEditorDomain||i,i=void 0!==window.ABTastyEditor||i;var n=!!sessionStorage.getItem("ABTastyPreview"),d=parseInt(DATA.cookieTime),s=a+TEST_ID;if(d>=0){if(e(s)&&!n&&!i)return;o(s,"viewed",d)}$("."+r+"advertising-modal, ."+r+"advertisingModalClose").show(),"1"==DATA.actionTracking&&"0"!=TEST_ID&&$("."+r+"advertising-modal").find("img#abtasty-advertising-image").click(function(){ABTastyClickTracking(DATA.actionTrackingName,null,TEST_ID)}),$(".underlay, ."+r+"advertisingModalClose").click(t),DATA.redirect>0&&setTimeout(t,1e3*DATA.redirect)}function t(){$("."+r+"advertising-modal, ."+r+"advertisingModalClose").remove()}function e(i){for(var t=i+"=",e=document.cookie.split(";"),n=0;n<e.length;n++){for(var o=e[n];" "==o.charAt(0);)o=o.substring(1);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return""}function n(){var i=document.location.hostname.split("").reverse().join("");if(null===(i=i.match(/(?:[a-z]{2,4}\.[a-z]{2,3}|[a-z]{2,5})\.[a-z0-9\-]+(?:\.|$)/i)))i=document.location.hostname;else{"."!=i[0].substr(i[0].length-1)&&(i[0]+="."),i=i[0].split("").reverse().join("")}return i}function o(i,t,e){var o="";if(e){var a=new Date;a.setTime(a.getTime()+24*e*60*60*1e3),o="expires="+a.toUTCString()}var r="domain="+n();document.cookie=i+"="+t+"; "+o+";"+r+";path=/"}var a="ABTastyAdvertisingModal",r="uid"+$.now(),d=void 0;d=$(window).height()-100;var s=function(i,t){t>d&&(t=d);var e="";e+="<style>."+r+"advertising-modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;}."+r+"advertising-modal .underlay{width:100%;height:100%;position:fixed;top:0;left:0;background-color:rgb(0, 0, 0);cursor:pointer;}."+r+"advertising-modal .advertising-modal{width:"+i+"px;height:"+t+"px;z-index:100;position:absolute;margin:auto;top:0;right:0;bottom:0;left:0;box-shadow: 0 3px 7px rgba(0, 0, 0, 0.4);border-radius:2px;-webkit-animation:popin .3s;animation:popin .3s;box-sizing: border-box;}</style>",e+="<style>."+r+"advertisingModalClose{cursor: pointer;line-height:50px;width:100%;border: 1px solid #111;color:#DDD;background:#222;font-size:16px;font-weight:bold;padding-right:20px;text-align:right;position:fixed;top:0;right:0;z-index:99999;display:none;}</style>",$("#abtasty-plugins-container").append(e)},l=function(){0===$("#abtasty-plugins-container").length&&$("<div>",{id:"abtasty-plugins-container"}).appendTo("body");var i=void 0;i='<img src="'+DATA.imgUrl+'" alt="" id="abtasty-advertising-image">',"http://"!==DATA.url&&""!==DATA.url&&(i='<a href="'+DATA.url+'">'+i+"</a>");var t="";t+='<div class="'+r+'advertisingModalClose">'+DATA.text+"</div>",t+='<div class="'+r+"advertising-modal "+a+'"><div class="underlay"></div><div class="advertising-modal">'+i+"</div></div>",$("#abtasty-plugins-container").append(t)},g=function(i,t,e){var n=0,o=0;n=setTimeout(function(){var t="error: can't find element '"+i+"'";console.debug(t),clearInterval(o)},1e4),o=setInterval(function(){$(i).length>0&&(clearTimeout(n),clearInterval(o),t(e))},200)},c=function(){l();var t=new Image;t.src=DATA.imgUrl,t.onload=function(){s(this.width,this.height),i()}};!function(){g("body",c)}()}();
//# sourceMappingURL=main.js.map
!function(){"use strict";var t;!function(t,e){if("undefined"==typeof document)return e;t=t||"";var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",a.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}(".abtasty-modal{display:none;z-index:1000000}.abtasty-modal,.abtasty-modal .abtasty-modal__underlay{position:fixed;top:0;left:0;width:100%;height:100%}.abtasty-modal .abtasty-modal__underlay{background-color:rgba(0,0,0,.8);cursor:pointer}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia{width:100%;height:100%;margin:0 auto!important;max-height:100%}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__content{height:100%;padding:0}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__image,.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__media{height:100%}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__image div{width:100%;height:100%;background-repeat:no-repeat;background-size:contain;background-position:50% 50%}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__video{height:100%;overflow:hidden}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__video iframe{overflow:auto;margin:auto;position:absolute;top:0;left:0;bottom:0;right:0}.abtasty-modal .abtasty-modal__area{width:600px;margin:150px auto!important;top:0;left:0;right:0;max-height:70%;z-index:100;position:relative}@media (max-width:740px){.abtasty-modal .abtasty-modal__area{width:95%;overflow:auto;max-height:95%;margin:15px auto!important}}.abtasty-modal .abtasty-modal__area .abtasty-modal__close{width:27px;height:27px;position:fixed;top:40px;right:40px;text-align:center;font-size:32px;font-weight:600;line-height:20px!important;background-color:#fff;border:0;color:#000;border-radius:50%;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important;cursor:pointer}@media (max-width:740px){.abtasty-modal .abtasty-modal__area .abtasty-modal__close{top:10px;right:10px}}.abtasty-modal .abtasty-modal__area .abtasty-modal__content{text-align:center;padding:20px;font-family:Lato!important;color:#000}.abtasty-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__title{font-weight:500;line-height:1.1;margin-bottom:10px;margin-top:30px;font-family:Lato!important;color:#c49641;text-shadow:0 2px 4px rgba(0,0,0,.5);font-size:48px;font-weight:700}.abtasty-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__image{cursor:pointer}.abtasty-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__text{margin:0 0 40px!important;font-weight:300;font-size:30px;color:#fff;text-shadow:0 2px 4px rgba(0,0,0,.5)}.abtasty-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__cta{margin:0 0 10px!important;font-size:25px;font-weight:300;min-width:100px;height:80px;padding:20px}",void 0);var e=function(t){var e=Object.prototype.hasOwnProperty;function a(t,o){return Array.isArray(t)?function(t,e){for(var o,i="",r="",d=Array.isArray(e),l=0;l<t.length;l++)(o=a(t[l]))&&(d&&e[l]&&(o=n(o)),i=i+r+o,r=" ");return i}(t,o):t&&"object"==typeof t?function(t){var a="",o="";for(var i in t)i&&t[i]&&e.call(t,i)&&(a=a+o+i,o=" ");return a}(t):t||""}function o(t){if(!t)return"";if("object"==typeof t){var a="";for(var o in t)e.call(t,o)&&(a=a+o+":"+t[o]+";");return a}return";"!==(t+="")[t.length-1]?t+";":t}function i(t,e,a,o){return!1!==e&&null!=e&&(e||"class"!==t&&"style"!==t)?!0===e?" "+(o?t:t+'="'+t+'"'):("function"==typeof e.toJSON&&(e=e.toJSON()),"string"==typeof e||(e=JSON.stringify(e),a||-1===e.indexOf('"'))?(a&&(e=n(e))," "+t+'="'+e+'"'):" "+t+"='"+e.replace(/'/g,"&#39;")+"'"):""}t.merge=function t(e,a){if(1===arguments.length){for(var i=e[0],r=1;r<e.length;r++)i=t(i,e[r]);return i}for(var n in a)if("class"===n){var d=e[n]||[];e[n]=(Array.isArray(d)?d:[d]).concat(a[n]||[])}else if("style"===n){var d=o(e[n]),l=o(a[n]);e[n]=d+l}else e[n]=a[n];return e},t.classes=a,t.style=o,t.attr=i,t.attrs=function(t,r){var n="";for(var d in t)if(e.call(t,d)){var l=t[d];if("class"===d){l=a(l),n=i(d,l,!1,r)+n;continue}"style"===d&&(l=o(l)),n+=i(d,l,!1,r)}return n};var r=/["&<>]/;function n(t){var e=""+t,a=r.exec(e);if(!a)return t;var o,i,n,d="";for(o=a.index,i=0;o<e.length;o++){switch(e.charCodeAt(o)){case 34:n="&quot;";break;case 38:n="&amp;";break;case 60:n="&lt;";break;case 62:n="&gt;";break;default:continue}i!==o&&(d+=e.substring(i,o)),i=o+1,d+=n}return i!==o?d+e.substring(i,o):d}return t.escape=n,t.rethrow=function t(e,a,o,i){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&a||i))throw e.message+=" on line "+o,e;try{i=i||require("fs").readFileSync(a,"utf8")}catch(a){t(e,null,o)}var r=3,n=i.split("\n"),d=Math.max(o-r,0),l=Math.min(n.length,o+r);var r=n.slice(d,l).map(function(t,e){var a=e+d+1;return(a==o?" > ":" ")+a+"| "+t}).join("\n");e.path=a;e.message=(a||"Pug")+":"+o+"\n"+r+"\n\n"+e.message;throw e},t}({}),a=function(t){var a,o="",i={};try{var r={},n=t||{};(function(t,r,n,d,l,s,c,m,y,u,f,v,b,p,_,h,g,x){i.image=a=function(){o+='<div class="abtasty-modal__image">',o="fullscreenMedia"===c?(o=o+"<a"+e.attr("href",v,!0,!0)+">")+"<div"+e.attr("style",e.style({"background-image":"url("+s+")"}),!0,!0)+"></div></a>":o+"<img"+(e.attr("src",s,!0,!0)+e.attr("style",e.style({"border-radius":y+"px",border:u+"px solid "+m}),!0,!0))+">",o+="</div>"},i.video=a=function(){var t="fullscreenMedia"===c?"":{"border-radius":y+"px",border:u+"px solid "+m};o=(o+='<div class="abtasty-modal__video">')+"<iframe"+(e.attr("id",g,!0,!0)+e.attr("src",x,!0,!0))+" allowfullscreen"+e.attr("style",e.style(t),!0,!0)+"></iframe></div>"},o=(o+='<div class="abtasty-modal__underlay"></div>')+"<div"+e.attr("class",e.classes(["abtasty-modal__area","abtasty-modal__"+c],[!1,!0]),!1,!0)+">",o+='<div class="abtasty-modal__close">',o+="×</div>",o+='<div class="abtasty-modal__content">',"textOnly"!=c&&(o+='<div class="abtasty-modal__media">',"image"===f&&i.image(),"video"===f&&"textOnly"!==c&&i.video(),o+="</div>"),"textOnly"!=c&&"mediaAndText"!=c||(o=(o=(o=(o=o+'<h2 class="abtasty-modal__title"'+e.attr("style",e.style({color:h}),!0,!0)+">")+e.escape(null==(a=_)?"":a)+"</h2>")+'<p class="abtasty-modal__text"'+e.attr("style",e.style({color:p}),!0,!0)+">")+e.escape(null==(a=b)?"":a)+"</p>",n&&(o=(o=o+'<a class="abtasty-modal__cta"'+e.attr("href",v,!0,!0)+e.attr("style",e.style({"border-radius":r+"px",color:l,"background-color":t}),!0,!0)+">")+(null==(a=d)?"":a)+"</a>")),o+="</div></div>"}).call(this,"ctaBackgroundColor"in n?n.ctaBackgroundColor:"undefined"!=typeof ctaBackgroundColor?ctaBackgroundColor:void 0,"ctaBorderRadius"in n?n.ctaBorderRadius:"undefined"!=typeof ctaBorderRadius?ctaBorderRadius:void 0,"ctaEnabled"in n?n.ctaEnabled:"undefined"!=typeof ctaEnabled?ctaEnabled:void 0,"ctaLabel"in n?n.ctaLabel:"undefined"!=typeof ctaLabel?ctaLabel:void 0,"ctaTextColor"in n?n.ctaTextColor:"undefined"!=typeof ctaTextColor?ctaTextColor:void 0,"image"in n?n.image:"undefined"!=typeof image?image:void 0,"layout"in n?n.layout:"undefined"!=typeof layout?layout:void 0,"mediaBorderColor"in n?n.mediaBorderColor:"undefined"!=typeof mediaBorderColor?mediaBorderColor:void 0,"mediaBorderRadius"in n?n.mediaBorderRadius:"undefined"!=typeof mediaBorderRadius?mediaBorderRadius:void 0,"mediaBorderThickness"in n?n.mediaBorderThickness:"undefined"!=typeof mediaBorderThickness?mediaBorderThickness:void 0,"mediaType"in n?n.mediaType:"undefined"!=typeof mediaType?mediaType:void 0,"redirectionUrl"in n?n.redirectionUrl:"undefined"!=typeof redirectionUrl?redirectionUrl:void 0,"text"in n?n.text:"undefined"!=typeof text?text:void 0,"textTextColor"in n?n.textTextColor:"undefined"!=typeof textTextColor?textTextColor:void 0,"title"in n?n.title:"undefined"!=typeof title?title:void 0,"titleTextColor"in n?n.titleTextColor:"undefined"!=typeof titleTextColor?titleTextColor:void 0,"videoID"in n?n.videoID:"undefined"!=typeof videoID?videoID:void 0,"videoUrl"in n?n.videoUrl:"undefined"!=typeof videoUrl?videoUrl:void 0)}catch(t){e.rethrow(t,void 0,void 0,r[void 0])}return o},o="AB Tasty Advertising modal "+TEST_ID,i=void 0!==window.ABTastyEditor,r=!!sessionStorage.getItem("ABTastyPreview"),n=Date.now();function d(t){var e=t.layout,a=void 0,o=void 0,i=window.innerWidth<window.innerHeight;return"fullscreenMedia"===e?!i?a=(o=window.innerHeight)/9*16:o=(a=window.innerWidth)/16*9:o=(a=window.innerWidth>630?.5*window.innerWidth:window.innerWidth-40)/16*9,{height:Math.round(o),width:Math.round(a)}}var l,s,c,m=function(){var e="abtasty-widget-video-"+Date.now(),o=document.createElement("abtasty-modal"),i=function(){return o.querySelector(".abtasty-modal__underlay")},r=function(){return o.querySelector(".abtasty-modal__close")},n=function(){return o.querySelector("#"+e)};function l(e){var a=e.mediaType;o.style.display="none","video"===a&&(o.innerHTML=""),t&&(document.querySelector("body").style.overflowY=t)}function s(){i().addEventListener("click",l),r().addEventListener("click",l)}return{hide:l,show:function(){o.style.display="block",s()},append:function(t){o.className="abtasty-modal",o.dataset.testId=TEST_ID;var i=Object.assign(t,{videoID:e,videoUrl:(r=t.video,s=t.autoPlay,c=r.indexOf("youtu")>-1,m=r.indexOf("vimeo")>-1,y=void 0,c?(y="//www.youtube.com/embed/"+r.match(/^.*(youtu.be\/|v\/|e\/|u\/\w+\/|embed\/|v=)([^#&?]*).*/)[2]+"?rel=0",s&&(y+="&autoplay=1")):m&&(y="//player.vimeo.com/video/"+r.match(/.*(www\.)?vimeo.com\/(\d+)($|\/)/)[2]),y)});var r,s,c,m,y;if(o.innerHTML=a(i),document.body.appendChild(o),n()){var u=d(t),f=u.width,v=u.height;n().style.width=f+"px",n().style.height=v+"px",n().frameBorder=0,window.addEventListener("resize",function(){var e=d(t);n().style.width=e.width+"px",n().style.height=e.height+"px"})}0!==t.timer&&setTimeout(function(){return l(t)},1e3*t.timer)},handleClose:s}}();function y(e,a){var d,l,s,c;l=e.recurrence,s=Number(l),(!(c=localStorage.getItem(o))||-1===s||i||r||(0===s?!sessionStorage.getItem(o):c<n-24*s*60*60*1e3))&&(m.append(e),m.show(),e.actionTrackingEvent&&ABTastyEvent(e.actionTrackingName,null,a),d=document.querySelector("body"),t=window.getComputedStyle(d).overflowY,d.style.overflowY="hidden",i||(localStorage.setItem(o,n),sessionStorage.setItem(o,n)))}"exitIntent"===DATA.triggerEvent?(l=function(){return y(DATA,TEST_ID)},c=0,document.addEventListener("mousemove",function(t){c=t.clientY}),document.body.addEventListener("mouseleave",function t(e){e.clientY<=50&&(c=0,clearInterval(s),s=setTimeout(function(){0===c&&(l(),document.removeEventListener("mouseleave",t))},0))},!1)):y(DATA,TEST_ID)}();
{
"name": "@abtasty/interstitiel",
"description": "AB Tasty Widget",
"version": "0.0.8",
"description": "A simple widget",
"version": "2.0.2",
"main": "dist/main.js",
"form": "dist/form.js",
"icon": "icon.png",
"form": "form.html",
"main": "dist/main.js",
"private": false,
"files": [
"icon.png",
"form.html",
"dist/main.js"
"dist"
],
"repository": "https://github.com/liwiocorps/engage-plugin-base.git",
"author": "Enguerran Dector <enguerran@abtasty.com>",
"repository": {
"type": "git",
"url": "git@gitlab.com:abtasty/widget/cli.git"
},
"author": "Julien BONNIN",
"license": "MIT",
"scripts": {
"start": "rollup -c --watch",
"start": "concurrently --kill-others \"npm run watch\" \"npm run serve\"",
"watch": "rollup -c --watch",
"build": "rollup -c",
"postversion": "npm publish",
"prepublish": "npm run build"
"serve": "widget serve",
"prepare": "npm run build",
"postpublish": "echo 'Your widget is on NPM. You can now add your widget to AB Tasty Marketplace at https://marketplace.abtasty.com/add'"
},
"devDependencies": {
"babel-preset-es2015-rollup": "^3.0.0",
"eslint": "^3.16.0",
"eslint-config-google": "^0.7.1",
"rollup": "^0.41.4",
"rollup-plugin-babel": "^2.7.1",
"rollup-plugin-eslint": "^3.0.0",
"rollup-plugin-uglify": "^1.0.1"
"cssnano": "^3.10.0",
"postcss-cssnext": "^2.9.0",
"rollup-plugin-postcss": "^0.2.0",
"rollup-plugin-pug": "^0.1.3",
"concurrently": "^3.5.0",
"eslint": "^4.9.0",
"eslint-config-airbnb-base": "^11.3.1",
"eslint-import-resolver-node": "^0.3.1",
"eslint-plugin-import": "^2.7.0",
"babel-preset-env": "^1.6.1",
"babel": "^6.23.0",
"babel-core": "^6.26.0",
"rollup": "^0.50.0",
"rollup-plugin-babel": "^3.0.2",
"rollup-plugin-eslint": "^4.0.0",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-uglify": "^2.0.1",
"rollup-watch": "^4.3.1"
},
"dependencies": {
"@abtasty/widget-utils": "^1.11.2",
"postcss-nested": "^3.0.0",
"postcss-simple-vars": "^4.1.0",
"rollup-plugin-sass": "^0.5.3"
}
}

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

# Engage Plugin Base
# advertising-modal
This widget was generated using AB Tasty Widget CLI. You can find more infomation and documentation about widgets at https://abtasty.gitbooks.io/widget/.
## Preview your widget
Launch your widget in a new window and watch for changes.
```bash
npm start
```
## Main files
* `main.js`
Main source code of your widget
* `form.html`
Configuration form for your widget
* `icon.png`
Icon for your widget (recommended size: 200x200px)
You can specify each file location in the `package.json` like this:
```json
"main": "dist/main.js",
"form": "form.html",
"icon": "icon.png",
```
## Included
* [Rollup.js](https://rollupjs.org/) module bundler (like Webpack but smaller and faster).
* ES6/2015 support using [Bublé](https://buble.surge.sh/) preprocessor (like Babel but much faster).
* JavaScript Linting with [ESLint](http://eslint.org/) and [Google config](https://github.com/google/eslint-config-google).
* JavaScript minified with [UglifyJS](https://github.com/mishoo/UglifyJS2).
* [.editorconfig](http://editorconfig.org/) for consistent coding styles within text editors.
**We heard your widget have an UI, so we allowed ourselves to include some extra:**
* [Pug](https://github.com/aMarCruz/rollup-plugin-pug) (aka Jade) to transforms html files into JS template.
* [PostCSS](https://github.com/egoist/rollup-plugin-postcss) to automatically append your CSS to head just using `import 'yourstyle.css'` and also use CSS plugins including:
* [CSSnext](http://cssnext.io/) to use the latest CSS syntax today.
* [cssnano](http://cssnano.co/) to minify CSS.
## Add your widget to AB Tasty
1. First, you'll need to have your widget on NPM:
* Create a minified bundle with `npm run build`
* Bump the version of your widget ([using semver](http://semver.org/)) with `npm version [patch|minor|major]`
* Publish it to NPM: `npm publish`
2. Once your widget is on NPM, you can now add it on AB Tasty at https://marketplace.abtasty.com/publish.

Sorry, the diff of this file is not supported yet

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