Last active
February 1, 2021 16:58
-
-
Save LeWolfYT/c5874d91514d1ae5bcac7ff21a0d8de5 to your computer and use it in GitHub Desktop.
An electron version of my site without the JS because electron is picky
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>my page</title> | |
<script src="./scripts.js"></script> | |
<link href="./styles.css" rel="stylesheet" type="text/css"> | |
</head> | |
<body> | |
<script> | |
welcome() | |
</script> | |
<p> | |
Sooooo uhh hi there | |
</p> | |
<p> | |
im working on this, trust me | |
</p> | |
<p> | |
this is the fiddle version of the site, running electron | |
<script> | |
document.write(process.versions.electron) | |
</script> | |
</p> | |
<button onclick="bee()"> | |
click for a totally safe surprise!!1!!! | |
</button> | |
<button onclick="dark()" > | |
*DISCLAIMER* Does nothing. | |
</button> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Modules to control application life and create native browser window | |
const {app, BrowserWindow} = require('electron') | |
function createWindow () { | |
// Create the browser window. | |
const mainWindow = new BrowserWindow({ | |
width: 800, | |
height: 600, | |
webPreferences: { | |
nodeIntegration: true | |
} | |
}) | |
// and load the index.html of the app. | |
mainWindow.loadFile('index.html') | |
// Open the DevTools. | |
// mainWindow.webContents.openDevTools() | |
} | |
// This method will be called when Electron has finished | |
// initialization and is ready to create browser windows. | |
// Some APIs can only be used after this event occurs. | |
app.whenReady().then(createWindow) | |
// Quit when all windows are closed, except on macOS. There, it's common | |
// for applications and their menu bar to stay active until the user quits | |
// explicitly with Cmd + Q. | |
app.on('window-all-closed', function () { | |
if (process.platform !== 'darwin') { | |
app.quit() | |
} | |
}) | |
app.on('activate', function () { | |
// On OS X it's common to re-create a window in the app when the | |
// dock icon is clicked and there are no other windows open. | |
if (BrowserWindow.getAllWindows().length === 0) { | |
createWindow() | |
} | |
}) | |
// In this file you can include the rest of your app's specific main process | |
// code. You can also put them in separate files and require them here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Empty |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is required by the index.html file and will | |
// be executed in the renderer process for that window. | |
// All of the Node.js APIs are available in this process. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("Hi!!!1!!!! i love coding"); | |
var drk = false; | |
function alert() { | |
alert("Welcome to the website! I hope you have a great time here!"); | |
} | |
function bee() { | |
alert("According to all known laws of aviation,"); | |
alert("there is no way a bee should be able to fly."); | |
alert("Its wings are too small to get its fat little body off the ground."); | |
alert("The bee, of course, flies anyway"); | |
console.log("e"); | |
} | |
function dark() { | |
if (drk === false) { | |
alert("In progress, does nothing"); | |
drk = true; | |
} else if (drk === true) { | |
alert("still does nothing"); | |
drk = false; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
background-repeat:no-repeat; | |
background: -moz-linear-gradient(to top, #ee9f00, #009fee) fixed; | |
background: -webkit-linear-gradient(to top, #ee9f00, #009fee) fixed; | |
background: linear-gradient(to top, #ee9f00, #009fee) fixed; | |
cursor: url(https://i.redd.it/lhogxfo3rf151.png); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment