Skip to content
This repository was archived by the owner on Dec 20, 2021. It is now read-only.

Commit 8470902

Browse files
committed
prettier
1 parent 6fea30f commit 8470902

File tree

7 files changed

+58
-61
lines changed

7 files changed

+58
-61
lines changed

config/userchrome.css

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
11
body {
2-
background-color: white;
3-
width: 100vw;
4-
height: 100vh;
2+
background-color: white;
3+
width: 100vw;
4+
height: 100vh;
55
}
66

77
webview {
8-
width: 100%;
9-
height: 90%;
8+
width: 100%;
9+
height: 90%;
1010
}
1111

1212
* {
13-
font-family: monospace;
14-
color: blue;
15-
font-size: 10pt;
16-
list-style-type: none;
17-
border: none;
18-
border-width: 0px;
13+
font-family: monospace;
14+
color: blue;
15+
font-size: 10pt;
16+
list-style-type: none;
17+
border: none;
18+
border-width: 0px;
1919
}
2020

2121
input {
22-
padding: 2pt;
23-
background-color: white;
24-
color: black;
25-
outline-color: #aa00ff;
22+
padding: 2pt;
23+
background-color: white;
24+
color: black;
25+
outline-color: #aa00ff;
2626
}
2727

2828
button {
29-
background-color: white;
30-
color: black;
31-
width: 100%;
29+
background-color: white;
30+
color: black;
31+
width: 100%;
3232
}
33-
td, tr {
34-
background-color: #0e0e0e;
35-
color: white
33+
td,
34+
tr {
35+
background-color: #0e0e0e;
36+
color: white;
3637
}

home.html

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
<!DOCTYPE HTML>
2-
<HTML>
3-
<HEAD>
4-
<script src="js/searchbox.js"></script>
5-
<link rel="stylesheet" href="config/userchrome.css">
6-
</HEAD>
7-
<BODY>
8-
<h1> 🐈 FreeCat! </h1>
9-
<br>
10-
<p> Customize your home page by editing src/home.html </p>
11-
<br>
12-
<p> freecat-electron-adapted Version 21.12.420 </p>
13-
<p> Entirely customizable and user configurable, under a free license. Feel free to fork! </p>
14-
</BODY>
15-
</HTML>
16-
17-
18-
19-
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<script src="js/searchbox.js"></script>
5+
<link rel="stylesheet" href="config/userchrome.css" />
6+
</head>
7+
<body>
8+
<h1>🐈 FreeCat!</h1>
9+
<br />
10+
<p>Customize your home page by editing src/home.html</p>
11+
<br />
12+
<p>freecat-electron-adapted Version 21.12.420</p>
13+
<p>
14+
Entirely customizable and user configurable, under a free license. Feel
15+
free to fork!
16+
</p>
17+
</body>
18+
</html>

index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>Freecat</title>
55
<link rel="stylesheet" href="config/userchrome.css" />
6-
<meta name="viewport" content="width=device-width, intitial-scale=1.0">
6+
<meta name="viewport" content="width=device-width, intitial-scale=1.0" />
77
<meta http-equiv="Content-Security-Policy" content="script-src 'self'" />
88
<link
99
rel="stylesheet"
@@ -24,4 +24,3 @@
2424
<script src="js/dynamic.js"></script>
2525
</body>
2626
</html>
27-

js/dynamic.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
function webload() {
2-
let wsite = document.getElementById("searchbox").value;
3-
document.getElementById("view").src=wsite;
2+
let wsite = document.getElementById("searchbox").value
3+
document.getElementById("view").src = wsite
44
}

js/searchbox.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
2-
31
function redirect() {
4-
const wsite = document.getElementById("searchbox").value
5-
window.location.href = wsite;
2+
const wsite = document.getElementById("searchbox").value
3+
window.location.href = wsite
64
}
75

86
function gotoWebLoader() {
9-
window.location.href = "webload.html";
7+
window.location.href = "webload.html"
108
}

main/main.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
// Modules to control application life and create native browser window
2-
const {app, BrowserWindow} = require('electron')
3-
const path = require('path')
2+
const { app, BrowserWindow } = require("electron")
3+
const path = require("path")
44

5-
function createWindow () {
5+
function createWindow() {
66
// Create the browser window.
77
const mainWindow = new BrowserWindow({
88
width: 800,
99
height: 600,
1010
webPreferences: {
11-
preload: path.join(__dirname, 'preload.js'),
12-
webviewTag: true
13-
}
11+
preload: path.join(__dirname, "preload.js"),
12+
webviewTag: true,
13+
},
1414
})
1515

1616
// and load the index.html of the app.
17-
mainWindow.loadFile('./index.html')
17+
mainWindow.loadFile("./index.html")
1818

1919
// Open the DevTools.
2020
// mainWindow.webContents.openDevTools()
@@ -26,7 +26,7 @@ function createWindow () {
2626
app.whenReady().then(() => {
2727
createWindow()
2828

29-
app.on('activate', function () {
29+
app.on("activate", function () {
3030
// On macOS it's common to re-create a window in the app when the
3131
// dock icon is clicked and there are no other windows open.
3232
if (BrowserWindow.getAllWindows().length === 0) createWindow()
@@ -36,8 +36,8 @@ app.whenReady().then(() => {
3636
// Quit when all windows are closed, except on macOS. There, it's common
3737
// for applications and their menu bar to stay active until the user quits
3838
// explicitly with Cmd + Q.
39-
app.on('window-all-closed', function () {
40-
if (process.platform !== 'darwin') app.quit()
39+
app.on("window-all-closed", function () {
40+
if (process.platform !== "darwin") app.quit()
4141
})
4242

4343
// In this file you can include the rest of your app's specific main process

main/preload.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// All of the Node.js APIs are available in the preload process.
22
// It has the same sandbox as a Chrome extension.
3-
window.addEventListener('DOMContentLoaded', () => {
3+
window.addEventListener("DOMContentLoaded", () => {
44
const replaceText = (selector, text) => {
55
const element = document.getElementById(selector)
66
if (element) element.innerText = text
77
}
88

9-
for (const type of ['chrome', 'node', 'electron']) {
9+
for (const type of ["chrome", "node", "electron"]) {
1010
replaceText(`${type}-version`, process.versions[type])
1111
}
1212
})

0 commit comments

Comments
 (0)