Skip to content

Commit

Permalink
Merge branch 'hotfix/1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamDASILVA committed Dec 6, 2018
2 parents f574436 + 7b4269e commit bbfa355
Show file tree
Hide file tree
Showing 10 changed files with 3,033 additions and 3,023 deletions.
29 changes: 16 additions & 13 deletions dist/vue-gorgias.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var Gorgias = function Gorgias(params) {
this.params = {
apiKey: null,
chatId: null,
injectCSS: null,
debug: false
};
this.BASE_URL = 'https://config.gorgias.io/production/';
Expand Down Expand Up @@ -74,19 +75,21 @@ Gorgias.prototype.ready = function ready (callback) {
* @function updateCSS
*/
Gorgias.prototype.updateCSS = function updateCSS () {
var iframe = document.querySelector('#gorgias-web-messenger-container');
logDebug('Update CSS called.', this.params);
if (iframe) {
try {
var link = document.createElement('link');
link.setAttribute('href', '/static/css/gorgias.css');
link.setAttribute('rel', 'stylesheet');
link.setAttribute('type', 'text/css');
// @ts-ignore
iframe.contentDocument.head.appendChild(link);
}
catch (e) {
console.error('Gorgias: Could not append CSS in Gorgias iframe.', e);
if (this.params.injectCSS) {
var iframe = document.querySelector('#gorgias-web-messenger-container');
logDebug('Update CSS called.', this.params);
if (iframe) {
try {
var link = document.createElement('link');
link.setAttribute('href', this.params.injectCSS);
link.setAttribute('rel', 'stylesheet');
link.setAttribute('type', 'text/css');
// @ts-ignore
iframe.contentDocument.head.appendChild(link);
}
catch (e) {
console.error('Gorgias: Could not append CSS in Gorgias iframe.', e);
}
}
}
};
Expand Down
29 changes: 16 additions & 13 deletions dist/vue-gorgias.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ var Gorgias = function Gorgias(params) {
this.params = {
apiKey: null,
chatId: null,
injectCSS: null,
debug: false
};
this.BASE_URL = 'https://config.gorgias.io/production/';
Expand Down Expand Up @@ -72,19 +73,21 @@ Gorgias.prototype.ready = function ready (callback) {
* @function updateCSS
*/
Gorgias.prototype.updateCSS = function updateCSS () {
var iframe = document.querySelector('#gorgias-web-messenger-container');
logDebug('Update CSS called.', this.params);
if (iframe) {
try {
var link = document.createElement('link');
link.setAttribute('href', '/static/css/gorgias.css');
link.setAttribute('rel', 'stylesheet');
link.setAttribute('type', 'text/css');
// @ts-ignore
iframe.contentDocument.head.appendChild(link);
}
catch (e) {
console.error('Gorgias: Could not append CSS in Gorgias iframe.', e);
if (this.params.injectCSS) {
var iframe = document.querySelector('#gorgias-web-messenger-container');
logDebug('Update CSS called.', this.params);
if (iframe) {
try {
var link = document.createElement('link');
link.setAttribute('href', this.params.injectCSS);
link.setAttribute('rel', 'stylesheet');
link.setAttribute('type', 'text/css');
// @ts-ignore
iframe.contentDocument.head.appendChild(link);
}
catch (e) {
console.error('Gorgias: Could not append CSS in Gorgias iframe.', e);
}
}
}
};
Expand Down
29 changes: 16 additions & 13 deletions dist/vue-gorgias.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
this.params = {
apiKey: null,
chatId: null,
injectCSS: null,
debug: false
};
this.BASE_URL = 'https://config.gorgias.io/production/';
Expand Down Expand Up @@ -78,19 +79,21 @@
* @function updateCSS
*/
Gorgias.prototype.updateCSS = function updateCSS () {
var iframe = document.querySelector('#gorgias-web-messenger-container');
logDebug('Update CSS called.', this.params);
if (iframe) {
try {
var link = document.createElement('link');
link.setAttribute('href', '/static/css/gorgias.css');
link.setAttribute('rel', 'stylesheet');
link.setAttribute('type', 'text/css');
// @ts-ignore
iframe.contentDocument.head.appendChild(link);
}
catch (e) {
console.error('Gorgias: Could not append CSS in Gorgias iframe.', e);
if (this.params.injectCSS) {
var iframe = document.querySelector('#gorgias-web-messenger-container');
logDebug('Update CSS called.', this.params);
if (iframe) {
try {
var link = document.createElement('link');
link.setAttribute('href', this.params.injectCSS);
link.setAttribute('rel', 'stylesheet');
link.setAttribute('type', 'text/css');
// @ts-ignore
iframe.contentDocument.head.appendChild(link);
}
catch (e) {
console.error('Gorgias: Could not append CSS in Gorgias iframe.', e);
}
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion dist/vue-gorgias.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bbfa355

Please sign in to comment.