Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion integrations/zopim/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Zopim.prototype.load = function(done) {
var scriptUrl = fmt('//v2.zopim.com/?%s', zopimId);

/* eslint-disable */
window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s=d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set._.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8');$.src=scriptUrl;z.t=+new Date;$.type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script');
window.$zopim || (function(d, s) { var z = (window.$zopim = function(c) { z._.push(c); }), $ = (z.s = d.createElement(s)), e = d.getElementsByTagName(s)[0]; z.set = function(o) { z.set._.push(o); }; z._ = []; z.set._ = []; $.async = !0; $.setAttribute('charset', 'utf-8'); $.src = scriptUrl; z.t = +new Date(); $.type = 'text/javascript'; e.parentNode.insertBefore($, e); })(document, 'script');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the compiled code for zopim would break because of a bad assignment.
The only real change here is $zopim= to window.$zompim=

/* eslint-enable */

when(this.loaded, done);
Expand Down
2 changes: 1 addition & 1 deletion integrations/zopim/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@segment/analytics.js-integration-zopim",
"description": "The Zopim analytics.js integration.",
"version": "2.0.0",
"version": "2.0.1",
"keywords": [
"analytics.js",
"analytics.js-integration",
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-shells.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ window['${libraryName}Loader'] = function() {
}
`.trim();

const filename = file.replace('.js', '.dynamic.js');
const filename = file.replace(/\.js$/, '.dynamic.js');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes compilation/uploads more reliable in dev

fs.writeFileSync(filename + '.gz', zlib.gzipSync(dynamic));
fs.writeFileSync(filename, dynamic);
});