Skip to content

Commit

Permalink
Fixes vexing electron inconsistency (#167) (#168)
Browse files Browse the repository at this point in the history
* Fixes vexing electron inconsistency

If Jquery is loaded from localhost rather than a remote resource, the first time it is included is effectively ignored (despite actually being loaded by the browser as shown by document inspector). This also appears to only affect JQuery. Even without the double include it works in the slim-gui.

* Adds a comment
  • Loading branch information
gfs committed Apr 30, 2019
1 parent ddbacf2 commit 384bdc6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
11 changes: 4 additions & 7 deletions Gui/Views/Shared/_Layout.cshtml
Expand Up @@ -18,14 +18,11 @@
Html.Raw(snippet.FullScript);
}
}
<script defer src="https://use.fontawesome.com/releases/v5.7.2/js/all.js" integrity="sha384-0pzryjIRos8mFBWMzSSZApWtPl/5++eIfzYmTgBBmXYdhvxPc+XcFEk+zJwDgWbP" crossorigin="anonymous"></script>
@Html.Raw(JavaScriptSnippet.FullScript)

<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js"
asp-fallback-src="~/lib/jquery.min.js"
asp-fallback-test="window.jQuery"
crossorigin="anonymous"
integrity=""></script>
@* Yep. This is included twice. Without including it twice electron does not work. *@
<script src="~/lib/jquery-3.4.0.min.js"></script>
<script src="~/lib/jquery-3.4.0.min.js"></script>
<script src="~/lib/fontawesome.js"></script>
<script src="~/lib/l10n.js"></script>
<script src="~/lib/popper.min.js"></script>
<script src="~/lib/bootstrap.min.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions Gui/package.json
Expand Up @@ -11,13 +11,13 @@
"dependencies": {
"portscanner": "^2.2.0",
"socket.io": "^2.2.0",
"electron": "^4.1.3"
"electron": "^4.1.5"
},
"devDependencies": {
"@types/node": "^10.12.18",
"@types/socket.io": "^2.1.2",
"tslint": "^5.14.0",
"typescript": "^3.4.1",
"electron": "^4.1.3"
"electron": "^4.1.5"
}
}
1 change: 1 addition & 0 deletions Gui/wwwroot/lib/fontawesome.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Gui/wwwroot/lib/jquery-3.4.0.min.js

Large diffs are not rendered by default.

0 comments on commit 384bdc6

Please sign in to comment.