mirror of
https://github.com/Ellpeck/ObsidianCustomFrames.git
synced 2024-11-22 01:33:29 +01:00
parent
2f6bff67f7
commit
6cf6eb04f2
1 changed files with 5 additions and 3 deletions
8
main.ts
8
main.ts
|
@ -100,9 +100,11 @@ class CustomFrameView extends ItemView {
|
|||
for (let other of require("electron").remote.getCurrentWebContents().mainFrame.frames) {
|
||||
if (frame.src.contains(new URL(other.url).host)) {
|
||||
other.executeJavaScript(`
|
||||
let style = document.createElement("style");
|
||||
style.textContent = \`${this.frame.customCss}\`;
|
||||
document.head.appendChild(style);
|
||||
(() => {
|
||||
let style = document.createElement("style");
|
||||
style.textContent = \`${this.frame.customCss}\`;
|
||||
document.head.appendChild(style);
|
||||
})();
|
||||
`);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue