mirror of
https://github.com/jaywcjlove/wxmp.git
synced 2026-01-12 08:18:49 +08:00
feat: add electron app.
This commit is contained in:
24
electron/preload/src/index.ts
Normal file
24
electron/preload/src/index.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
const styleStr = `.siderbar {
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
.siderbar header h1 a, github-corners {
|
||||
display: none;
|
||||
}
|
||||
article.content:before {
|
||||
-webkit-app-region: drag;
|
||||
position: absolute;
|
||||
content: ' ';
|
||||
display: block;
|
||||
height: 41px;
|
||||
width: 100%;
|
||||
z-index: -1;
|
||||
}`;
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const head = document.querySelector('head');
|
||||
const style = document.createElement('style');
|
||||
style.textContent = styleStr;
|
||||
if (head) {
|
||||
head.append(style);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user