Skip to content

d43m0nhLInt3r/PepegaBoard

Repository files navigation

PepegaBoard

An Open Source Pepega Board

How to add an image

index.html

$ <a id="myNewEmote" href="#">
$         <img src="./images/myNewEmote.jpg" class="rounded float-left mb-5 mr-3" style="width:200px; height:200px;">
$     </a>

renderer.js

$ document.getElementById("myNewEmote").addEventListener("click", (event) => {
$  localStorage.setItem("id", "myNewEmote");
$  const modalPath = path.join("file://", __dirname, "frame.html");
$  let win = new BrowserWindow({ frame: false, width: 256, height: 256, alwaysOnTop: true });
$  win.on("close", () => {
$    win = null;
$  });
$  win.loadURL(modalPath);
$  win.show();
$ });

frame.html

$ case "myNewEmote":
$                    document.getElementById("view").src = './images/myNewEmote.jpg';
$                    break;

How to add an audio

index.html

$ <a id="myNewAudio" href="#">
$        <img src="./images/play.png" class="rounded float-left mb-5 mr-3" style="width:200px; height:200px;">
$     </a>

renderer.js

$ document.getElementById("myNewAudio").addEventListener("click", (event) => {
$  localStorage.setItem("id", "myNewAudio");
$ const modalPath = path.join("file://", __dirname, "audio.html");
$  let win = new BrowserWindow({ frame: false, width: 256, height: 256, alwaysOnTop: true });
$  win.on("close", () => {
$    win = null;
$  });
$  win.loadURL(modalPath);
$  win.show();
$ });

frame.html

case "myNewAudio":
                    document.getElementById("play").src = './audio/myNewAudio.mp3';
                    document.getElementById("view").src = './images/myNewAudio.jpg';
                    break;