更新Linux批量打包脚本

This commit is contained in:
Tlntin
2022-11-20 10:35:21 +08:00
parent 5b9e5a7228
commit be9aeb64b4
40 changed files with 39 additions and 211 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 874 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

View File

@@ -1,175 +0,0 @@
/**
* @typedef {string} KeyboardKey `event.key` 的代号,
* 见 <https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values>
* @typedef {() => void} OnKeyDown 使用者按下 ⌘ [KeyboardKey] 时应该执行的行为
* 以 Meta 键 (⌘) 为首的快捷键清单。
* 每个写在这里的 shortcuts 都会运行 {@link Event.preventDefault}.
* @type {Record<KeyboardKey, OnKeyDown>}
*/
const metaKeyShortcuts = {
'ArrowUp': () => scrollTo(0, 0),
'ArrowDown': () => scrollTo(0, document.body.scrollHeight),
'[': () => window.history.back(),
']': () => window.history.forward(),
'r': () => window.location.reload(),
'-': () => zoomOut(),
'=': () => zoomIn(),
'0': () => zoomCommon(() => '100%'),
}
window.addEventListener('DOMContentLoaded', (_event) => {
const style = document.createElement('style');
style.innerHTML = `
#page #footer-wrapper,
.drawing-board .toolbar .toolbar-action,
.c-swiper-container,
.download_entry,
.lang, .copyright,
.wwads-cn, .adsbygoogle,
#Bottom > div.content > div.inner,
#Rightbar .sep20:nth-of-type(5),
#Rightbar > div.box:nth-child(4),
#Main > div.box:nth-child(8) > div
#Wrapper > div.sep20,
#Main > div.box:nth-child(8),
#masthead-ad,
#Rightbar > div:nth-child(6) > div.sidebar_compliance {
display: none !important;
}
#page .main_header {
padding-top: 20px;
}
.panel.give_me .nav_view {
top: 154px !important;
}
.columns .column #header{
padding-top: 30px;
}
ytd-masthead>#container.style-scope.ytd-masthead {
padding-top: 12px !important;
}
.wrap.h1body-exist.max-container > div.menu-tocs > div.menu-btn{
top: 28px;
}
#Wrapper{
background-color: #F8F8F8 !important;
background-image:none !important;
}
#Top {
border-bottom: none;
}
.container-with-note #home, .container-with-note #switcher{
top: 30px;
}
.geist-page nav.dashboard_nav__PRmJv {
padding-top:10px;
}
.geist-page .submenu button{
margin-top:24px;
}
#pack-top-dom:active {
cursor: grabbing;
cursor: -webkit-grabbing;
}
#pack-top-dom{
position:fixed;
background:transparent;
top:0;
width: 100%;
height: 20px;
cursor: grab;
cursor: -webkit-grab;
z-index: 90000;
}
`;
document.head.append(style);
const topDom = document.createElement('div');
topDom.id = 'pack-top-dom';
document.body.appendChild(topDom);
const domEl = document.getElementById('pack-top-dom');
domEl.addEventListener('mousedown', (e) => {
if (e.buttons === 1 && e.detail !== 2) {
window.ipc.postMessage('drag_window');
}
});
domEl.addEventListener('touchstart', () => {
window.ipc.postMessage('drag_window');
});
domEl.addEventListener('dblclick', () => {
window.ipc.postMessage('fullscreen');
});
document.addEventListener('keyup', function (event) {
const preventDefault = (f) => {
event.preventDefault();
f();
};
if (event.metaKey && event.key in metaKeyShortcuts) {
preventDefault(metaKeyShortcuts[event.key]);
}
});
document.addEventListener('click', (e) => {
const origin = e.target.closest('a');
if (origin && origin.href) {
origin.target = '_self';
//额外处理下 twitter 的外跳,对于其他需要外跳的可以改这里成对应域名
const href = origin.href;
if(location.host === "twitter.com" && href.indexOf("twitter.com")===-1){
e.preventDefault();
window.ipc.postMessage(`open_browser:${href}`);
}
}
});
});
setDefaultZoom();
function setDefaultZoom() {
const htmlZoom = window.localStorage.getItem('htmlZoom');
if (htmlZoom) {
document.getElementsByTagName('html')[0].style.zoom = htmlZoom;
}
}
/**
* @param {(htmlZoom: string) => string} [zoomRule]
*/
function zoomCommon(zoomRule) {
const htmlZoom = window.localStorage.getItem('htmlZoom') || '100%';
const html = document.getElementsByTagName('html')[0];
const zoom = zoomRule(htmlZoom);
html.style.zoom = zoom;
window.localStorage.setItem('htmlZoom', zoom);
}
function zoomIn() {
zoomCommon((htmlZoom) =>
`${Math.min(parseInt(htmlZoom) + 10, 200)}%`
);
}
function zoomOut() {
zoomCommon((htmlZoom) =>
`${Math.max(parseInt(htmlZoom) - 10, 30)}%`
);
}