Skip to content

Instantly share code, notes, and snippets.

View erikian's full-sized avatar
:electron:

Erik Moura erikian

:electron:
  • Sorocaba, São Paulo, Brasil
  • 02:11 (UTC -03:00)
  • LinkedIn in/erik-moura
View GitHub Profile
@erikian
erikian / index.html
Last active March 8, 2024 17:08
e/e #40960 / #41008
<html>
<script type="text/javascript">
async function rm() {
const dir = document.querySelector("input").value;
try {
await api.rm(dir);
} catch (ex) {
alert(ex.message);
}
}
@erikian
erikian / main.js
Created January 23, 2025 22:31
safeStorage productName demo
const { app, safeStorage } = require('electron')
console.log(safeStorage.isEncryptionAvailable())
app.whenReady().then(() => {
console.log('app ready')
})
@erikian
erikian / index.html
Last active March 19, 2025 20:23
`InputEvent.modifiers` capitalization
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
<link href="./styles.css" rel="stylesheet">
<title>Hello World!</title>
</head>
<body>