Making browser launcher work for electron & web.

This commit is contained in:
Tristan Roux
2019-03-28 22:03:56 +01:00
parent 043a7a6fef
commit 688f72a5f6
4 changed files with 15 additions and 11 deletions
+10 -1
View File
@@ -1,4 +1,13 @@
<div class="container">
<p>Steam</p>
<button><a class="browser" href="http://eau.raccoon-sdg.fr/steamLog.php">Steam sign in</a></button>
</div>
</div>
<script>
$(".browser").click((event) => {
if(shell != null)
event.preventDefault();
shell.openExternal(event.target.href);
});
</script>
+3 -3
View File
@@ -3,8 +3,8 @@ const { shell } = require("electron");
$(".browser").click((event) =>
{
console.log("Steam log clicked");
event.preventDefault();
console.log(shell);
if(shell != null)
event.preventDefault();
shell.openExternal(event.target.href);
});
+1 -6
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -32,7 +32,7 @@ function openSettings()
{
$("#content").load("fragments/settings.html", () =>
{
//Do things when the settings has been loaded.
});
document.getElementById("title").innerHTML = "<i class='icon fas fa-arrow-left'></i> Settings";
}