|
|
@ -1,6 +1,21 @@ |
|
|
|
import { environment } from "bluetooth-class/scripts/environment"; |
|
|
|
import { ErrorMonitor } from "shared/scripts/error-monitor"; |
|
|
|
|
|
|
|
// This entire application relies on bitwise operators, so we'll stop tslint from complaining right away
|
|
|
|
// tslint:disable:no-bitwise
|
|
|
|
|
|
|
|
// Start the error watcher for the production environment
|
|
|
|
if (environment.production) { |
|
|
|
new ErrorMonitor("https://ab6fd35ef01e438eb32719f4d92ee084@sentry.io/5178420"); |
|
|
|
} |
|
|
|
|
|
|
|
// Load our service worker to enable PWA functionality
|
|
|
|
if ("serviceWorker" in navigator) { |
|
|
|
window.addEventListener("load", () => { |
|
|
|
navigator.serviceWorker.register("service-worker.js").then(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
// Container for our bluetooth class code
|
|
|
|
let bluetoothClass = 0; |
|
|
|
|
|
|
@ -74,10 +89,3 @@ checkboxesAndRadios.forEach((element: HTMLInputElement) => { |
|
|
|
// Default the bluetooth class field and minor device fields on page load
|
|
|
|
updateBluetoothClassField(); |
|
|
|
updateBluetoothMinorDeviceFields(); |
|
|
|
|
|
|
|
// Load our service worker to enable PWA functionality
|
|
|
|
if ("serviceWorker" in navigator) { |
|
|
|
window.addEventListener("load", () => { |
|
|
|
navigator.serviceWorker.register("service-worker.js").then(); |
|
|
|
}); |
|
|
|
} |
|
|
|