mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🚨
This commit is contained in:
parent
2a214fe50e
commit
e8ade79630
7 changed files with 12 additions and 16 deletions
|
|
@ -192,7 +192,7 @@ const boot = () => {
|
|||
webviewTag: true,
|
||||
webSecurity: false,
|
||||
contextIsolation: false,
|
||||
autoplayPolicy: 'user-gesture-required' // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587
|
||||
autoplayPolicy: "user-gesture-required" // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587
|
||||
},
|
||||
frame: "darwin" === process.platform,
|
||||
titleBarStyle: "hidden",
|
||||
|
|
@ -752,7 +752,7 @@ app.whenReady().then(() => {
|
|||
nodeIntegration: true,
|
||||
webviewTag: true,
|
||||
webSecurity: false,
|
||||
autoplayPolicy: 'user-gesture-required' // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587
|
||||
autoplayPolicy: "user-gesture-required" // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587
|
||||
},
|
||||
});
|
||||
win.loadURL(data.url);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import {closePanel} from "./closePanel";
|
|||
import {openMobileFileById} from "../editor";
|
||||
import {validateName} from "../../editor/rename";
|
||||
import {getEventName} from "../../protyle/util/compatibility";
|
||||
import {mountHelp} from "../../util/mount";
|
||||
import {fetchPost} from "../../util/fetch";
|
||||
import {setInlineStyle} from "../../util/assets";
|
||||
import {renderSnippet} from "../../config/util/snippets";
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ export const initKeyboardToolbar = () => {
|
|||
preventRender = true;
|
||||
setTimeout(() => {
|
||||
preventRender = false;
|
||||
}, 1000)
|
||||
}, 1000);
|
||||
return;
|
||||
} else if (type === "goinline") {
|
||||
const dynamicElements = document.querySelectorAll("#keyboardToolbar .keyboard__dynamic");
|
||||
|
|
|
|||
|
|
@ -468,7 +468,7 @@ const renderPDF = (id: string) => {
|
|||
nodeIntegration: true,
|
||||
webviewTag: true,
|
||||
webSecurity: false,
|
||||
autoplayPolicy: 'user-gesture-required' // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587
|
||||
autoplayPolicy: "user-gesture-required" // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587
|
||||
},
|
||||
});
|
||||
ipcRenderer.send(Constants.SIYUAN_EXPORT_PREVENT, window.siyuan.printWin.id);
|
||||
|
|
|
|||
|
|
@ -16,24 +16,24 @@ export const previewTemplate = (pathString: string, element: Element, parentId:
|
|||
const mergeElement = (a: Element, b: Element, after = true) => {
|
||||
a.setAttribute("data-type", a.getAttribute("data-type").replace("search-mark", "").trim());
|
||||
b.setAttribute("data-type", b.getAttribute("data-type").replace("search-mark", "").trim());
|
||||
const attributes = a.attributes
|
||||
let isMatch = true
|
||||
const attributes = a.attributes;
|
||||
let isMatch = true;
|
||||
for (let i = 0; i < attributes.length; i++) {
|
||||
if (b.getAttribute(attributes[i].name) !== attributes[i].value) {
|
||||
isMatch = false
|
||||
isMatch = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (isMatch) {
|
||||
if (after) {
|
||||
a.innerHTML = a.innerHTML + b.innerHTML
|
||||
a.innerHTML = a.innerHTML + b.innerHTML;
|
||||
} else {
|
||||
a.innerHTML = b.innerHTML + a.innerHTML
|
||||
a.innerHTML = b.innerHTML + a.innerHTML;
|
||||
}
|
||||
b.remove();
|
||||
}
|
||||
return isMatch;
|
||||
}
|
||||
};
|
||||
|
||||
export const removeSearchMark = (element: HTMLElement) => {
|
||||
let previousElement = element.previousSibling as HTMLElement;
|
||||
|
|
@ -56,4 +56,4 @@ export const removeSearchMark = (element: HTMLElement) => {
|
|||
if (element.getAttribute("data-type").includes("search-mark")) {
|
||||
element.setAttribute("data-type", element.getAttribute("data-type").replace("search-mark", "").trim());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,12 +7,10 @@ import {
|
|||
getSelectionOffset,
|
||||
setFirstNodeRange,
|
||||
} from "../util/selection";
|
||||
import {fullscreen, netImg2LocalAssets} from "../breadcrumb/action";
|
||||
import {setPadding} from "../ui/initUI";
|
||||
import {netImg2LocalAssets} from "../breadcrumb/action";
|
||||
/// #if !MOBILE
|
||||
import {openBacklink, openGraph, openOutline} from "../../layout/dock/util";
|
||||
/// #endif
|
||||
import {reloadProtyle} from "../util/reload";
|
||||
import {getContenteditableElement, hasNextSibling, hasPreviousSibling} from "./getBlock";
|
||||
import {hasClosestByMatchTag} from "../util/hasClosest";
|
||||
import {hideElements} from "../ui/hideElements";
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import {Constants} from "../constants";
|
|||
import {appearance} from "../config/appearance";
|
||||
import {globalShortcut} from "./globalShortcut";
|
||||
import {fetchPost} from "./fetch";
|
||||
import {mountHelp} from "./mount";
|
||||
import {addGA, initAssets, setInlineStyle} from "./assets";
|
||||
import {renderSnippet} from "../config/util/snippets";
|
||||
import {openFileById} from "../editor/util";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue