Add portable Windows desktop downloads and release uploads
This commit is contained in:
17
desktop/navigation.cjs
Normal file
17
desktop/navigation.cjs
Normal file
@@ -0,0 +1,17 @@
|
||||
const SITE_URL = "https://minegeo.vercel.app";
|
||||
function isInternal(value) {
|
||||
try {
|
||||
return new URL(value).origin === SITE_URL;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function isExternal(value) {
|
||||
try {
|
||||
const url = new URL(value);
|
||||
return url.protocol === "https:" && !url.username && !url.password;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
module.exports = { SITE_URL, isInternal, isExternal };
|
||||
Reference in New Issue
Block a user