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