mirror of
https://github.com/fleetbase/fleetbase.git
synced 2026-01-06 06:15:51 +00:00
15 lines
551 B
JavaScript
15 lines
551 B
JavaScript
export function initialize() {
|
|
// Check if the script already exists
|
|
// Only insert the script tag if it doesn't already exist
|
|
if (!document.querySelector('script[data-socketcluster-client]')) {
|
|
const socketClusterClientScript = document.createElement('script');
|
|
socketClusterClientScript.setAttribute('data-socketcluster-client', '1');
|
|
socketClusterClientScript.src = '/assets/socketcluster-client.min.js';
|
|
document.body.appendChild(socketClusterClientScript);
|
|
}
|
|
}
|
|
|
|
export default {
|
|
initialize,
|
|
};
|