@@ -1,5 +1,7 @@
|
||||
<script>
|
||||
import { apikey, lang, stationinfo } from "./store.js";
|
||||
import isURL from 'validator/lib/isURL';
|
||||
import isUUID from 'validator/lib/isUUID';
|
||||
import axios from "axios";
|
||||
import { _, locale } from "svelte-i18n";
|
||||
let token;
|
||||
@@ -9,20 +11,6 @@
|
||||
token?.length === 44 &&
|
||||
token.split(".")[0].length === 7 &&
|
||||
isUUID(token.split(".")[1]);
|
||||
function isLocale(l) {
|
||||
return $locale == l;
|
||||
}
|
||||
function isUUID(uuid) {
|
||||
let s = "" + uuid;
|
||||
|
||||
s = s.match(
|
||||
"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
|
||||
);
|
||||
if (s === null) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="w-full flex flex-wrap">
|
||||
|
||||
Reference in New Issue
Block a user