Przywrócono select box dla stacji z wieloma posterunkami

This commit is contained in:
2021-05-25 20:51:31 +02:00
parent 3706b69866
commit 35234b7ce8
3 changed files with 59 additions and 53 deletions
+17
View File
@@ -153,6 +153,8 @@ export default class App extends Vue {
}
mounted() {
this.detectIEVersion();
if (StorageManager.getStringValue("version") != this.VERSION) {
StorageManager.setStringValue("version", this.VERSION);
@@ -164,6 +166,21 @@ export default class App extends Vue {
this.hasReleaseNotes &&
!StorageManager.getBooleanValue("version_notes_read");
}
detectIEVersion() {
var rv = -1;
if (navigator.appName == "Microsoft Internet Explorer") {
var ua = navigator.userAgent;
var re = new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})");
if (re.exec(ua) != null) rv = parseFloat(RegExp.$1);
} else if (navigator.appName == "Netscape") {
var ua = navigator.userAgent;
var re = new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})");
if (re.exec(ua) != null) rv = parseFloat(RegExp.$1);
}
console.log("IE version:", rv);
}
}
</script>