mirror of
https://github.com/zadam/trilium.git
synced 2026-07-07 17:23:54 +02:00
check target iframe
This commit is contained in:
@@ -20,10 +20,9 @@ async function main() {
|
||||
|
||||
if (window.parent && window.parent !== window) {
|
||||
window.parent.addEventListener('webviewerloaded', (event) => {
|
||||
const iframeWindow = event.detail.source;
|
||||
if (iframeWindow.PDFViewerApplicationOptions) {
|
||||
iframeWindow.PDFViewerApplicationOptions.set("disablePreferences", true);
|
||||
iframeWindow.PDFViewerApplicationOptions.set("enableHighlightFloatingButton", true);
|
||||
if (event.detail?.source === window && window.PDFViewerApplicationOptions) {
|
||||
window.PDFViewerApplicationOptions.set("disablePreferences", true);
|
||||
window.PDFViewerApplicationOptions.set("enableHighlightFloatingButton", true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user