🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

nuxt-intercom

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-intercom - npm Package Compare versions

Comparing version

to
1.0.4

1

dist/module.js

@@ -8,2 +8,3 @@ import path from "path";

verticalPadding: 20,
enableMobilePadding: false,
};

@@ -10,0 +11,0 @@ const options = Object.assign({}, defaults, this.options.intercom);

14

dist/plugin.js

@@ -8,8 +8,14 @@ const INTERCOM_URL = "https://widget.intercom.io/widget/";

vertical_padding: Number.parseInt("<%= options.verticalPadding %>"),
enable_mobile_padding: "<%= options.enableMobilePadding %>" === "true",
};
const injectScript = (appId) => {
const injectScript = (settings) => {
const headOrBody = document.head || document.body;
if (settings.enable_mobile_padding) {
const style = document.createElement("style");
style.innerHTML = `#intercom-container .intercom-borderless-frame{bottom:${settings.vertical_padding}px!important}`;
headOrBody.appendChild(style);
}
const script = document.createElement("script");
script.async = true;
script.src = `${INTERCOM_URL}${appId}`;
const headOrBody = document.head || document.body;
script.src = `${INTERCOM_URL}${settings.app_id}`;
headOrBody.appendChild(script);

@@ -32,3 +38,3 @@ return script;

window.Intercom = i;
let script = injectScript(settings.app_id);
let script = injectScript(settings);
script.addEventListener("load", () => {

@@ -35,0 +41,0 @@ window.Intercom("boot", settings);

{
"name": "nuxt-intercom",
"version": "1.0.3",
"version": "1.0.4",
"description": "NuxtJS module for Intercom",

@@ -5,0 +5,0 @@ "repository": "github:dogchef-be/nuxt-intercom",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet