...
 
Commits (2)
import 'https://unpkg.com/converse.js@4.1/dist/converse.min.js';
import 'https://unpkg.com/converse.js@4.2/dist/converse.js';
import { Helpers, SIBBase, store } from 'https://unpkg.com/@startinblox/core@0.7';
const base_url = import.meta.url.replace(/\/[^\/]*$/, '');
......@@ -32,13 +32,13 @@ export class ChatWindow extends SIBBase {
this.attachShadow({ mode: 'open' });
this.shadowRoot.append(
...Helpers.importCSS(
'https://unpkg.com/converse.js@4.1.0/css/converse.min.css',
'https://unpkg.com/converse.js@4.2/css/converse.css',
`${base_url}/converse-embed.css`,
),
);
// Dirty fix. @see https://stackoverflow.com/questions/33696169/chrome-extension-font-awesome-wont-display-in-shadow-root
Helpers.importCSS(
'https://unpkg.com/converse.js@4.1.0/css/fonts.css'
'https://unpkg.com/converse.js@4.2/css/fonts.css'
);
if (typeof window.converse === 'undefined') {
window.converseLoaded = new Promise((resolve, reject) =>
......@@ -95,7 +95,7 @@ export class ChatWindow extends SIBBase {
locales_url: this.dataset.localesUrl,
whitelisted_plugins: ['sib-chat'],
view_mode: 'embedded',
sounds_path: 'https://unpkg.com/converse.js@4.1.0/sounds/',
sounds_path: 'https://unpkg.com/converse.js@4.2/sounds/',
});
window.converseInitialized.resolve();
}
......