mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-18 06:48:09 +00:00
Disable base href for electron
This commit is contained in:
@ -15,7 +15,7 @@ init:
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
- ps: Install-Product node 8 x64
|
- ps: Install-Product node 8 x64
|
||||||
- yarn
|
- yarn install
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- yarn buildforelectron
|
- yarn buildforelectron
|
||||||
|
@ -2,22 +2,23 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>GNS3 Web UI Demo</title>
|
<title>GNS3 Web UI</title>
|
||||||
<!-- It's important to have base here because of the script below //-->
|
<!-- It's important to have base here because of the script below //-->
|
||||||
<base href="/">
|
<base href="./">
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var userAgent = navigator.userAgent.toLowerCase();
|
var userAgent = navigator.userAgent.toLowerCase();
|
||||||
|
|
||||||
// in case we're running in electron because we need it for resources
|
// in case we're running in electron because we need it for resources
|
||||||
if (userAgent.indexOf(' electron/') > -1) {
|
// if (userAgent.indexOf(' electron/') > -1) {
|
||||||
var base = document.getElementsByTagName('base');
|
// var base = document.getElementsByTagName('base');
|
||||||
if(base.length > 0) {
|
// if(base.length > 0) {
|
||||||
base.href = document.location;
|
// base.href = document.location;
|
||||||
}
|
// }
|
||||||
else {
|
// else {
|
||||||
document.write('<base href="' + document.location + '" />');
|
// document.write('<base href="' + document.location + '" />');
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
Reference in New Issue
Block a user