Skip to content
This repository has been archived by the owner on Mar 11, 2022. It is now read-only.

Commit

Permalink
Make it able to build
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeDuncko committed Sep 28, 2020
1 parent 6712f88 commit d6ab08b
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
margin: auto;
max-width: 38rem;
padding: 2rem;
}
33 changes: 33 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello World!</title>

<style>
webview {
height: 400px;
}
p {
color: blue;
}
</style>

<script>
const { ipcRenderer } = require("electron");

ipcRenderer.on("change", (event, data) => {
console.log("change", data);

document.getElementById("embed").src = data;
});
</script>
</head>
<body>
<h1>💖 Hello World!</h1>
<p>Welcome to your Electron application.</p>
<embed id="embed" src="file:///Users/joeduncko/Downloads/f/BeepBeep.swf" width="550" height="400"> </embed>
<!-- <embed id="embed" src="https://i.4cdn.org/f/HNNNNNG.swf" width="550" height="400"> </embed> -->
<!-- <img id="embed" src="" /> -->
</body>
</html>
31 changes: 31 additions & 0 deletions src/renderer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* This file will automatically be loaded by webpack and run in the "renderer" context.
* To learn more about the differences between the "main" and the "renderer" context in
* Electron, visit:
*
* https://electronjs.org/docs/tutorial/application-architecture#main-and-renderer-processes
*
* By default, Node.js integration in this file is disabled. When enabling Node.js integration
* in a renderer process, please be aware of potential security implications. You can read
* more about security risks here:
*
* https://electronjs.org/docs/tutorial/security
*
* To enable Node.js integration in this file, open up `main.js` and enable the `nodeIntegration`
* flag:
*
* ```
* // Create the browser window.
* mainWindow = new BrowserWindow({
* width: 800,
* height: 600,
* webPreferences: {
* nodeIntegration: true
* }
* });
* ```
*/

import './index.css';

console.log('👋 This message is being logged by "renderer.js", included via webpack');

0 comments on commit d6ab08b

Please sign in to comment.