Skip to content

Instantly share code, notes, and snippets.

View face08's full-sized avatar
🎯
Focusing

face08

🎯
Focusing
View GitHub Profile
@face08
face08 / index.html
Created October 4, 2021 03:51
electron-theme
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
<link rel="stylesheet" type="text/css" href="./styles.css">
</head>
<body>
<h1>Hello World!</h1>
@face08
face08 / index.html
Last active October 22, 2021 12:32
element-audio-output
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<!--<audio controls id="aud"-->
<!-- src="https://upload.wikimedia.org/wikipedia/en/d/dc/Strawberry_Fields_Forever_(Beatles_song_-_sample).ogg"-->
<!-- loop></audio>-->
@face08
face08 / index.html
Last active October 11, 2021 07:54
electron-shareScreen
<!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'">
<title>shareScreen</title>
</head>
<body>
<video width="500" height="500" autoplay></video>
@face08
face08 / index.html
Last active October 12, 2021 10:23
electron-top
<!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'">
<meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<title>Hello World!</title>
</head>
<body>
@face08
face08 / index.html
Created October 21, 2021 10:39
electron-screen
<!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'">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
@face08
face08 / index.html
Last active November 2, 2021 12:20
electron-permission
<!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'">
<meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<title>Hello World!</title>
</head>
<body>
@face08
face08 / encodeHtml.JS
Created November 5, 2021 08:25 — forked from greycode/encodeHtml.JS
javascript 对 HTML 做转义处理
//$package("js.lang"); // 没有包管理时,也可简单写成 js = {lang:{}};
js = {lang:{}};
js.lang.String = function(){
this.REGX_HTML_ENCODE = /"|&|'|<|>|[\x00-\x20]|[\x7F-\xFF]|[\u0100-\u2700]/g;
this.REGX_HTML_DECODE = /&\w+;|&#(\d+);/g;
this.REGX_TRIM = /(^\s*)|(\s*$)/g;