diff --git a/external/@worldbrain/memex-common b/external/@worldbrain/memex-common index 96a61568ee..8e477f6366 160000 --- a/external/@worldbrain/memex-common +++ b/external/@worldbrain/memex-common @@ -1 +1 @@ -Subproject commit 96a61568ee61f7f57054b55c3e809114aa4a683e +Subproject commit 8e477f6366faeb854460b86ac0798caf7729e20f diff --git a/src/sidebar/annotations-sidebar/components/AnnotationsSidebar.tsx b/src/sidebar/annotations-sidebar/components/AnnotationsSidebar.tsx index 392e47cd3f..49e5bf6381 100644 --- a/src/sidebar/annotations-sidebar/components/AnnotationsSidebar.tsx +++ b/src/sidebar/annotations-sidebar/components/AnnotationsSidebar.tsx @@ -582,8 +582,8 @@ export class AnnotationsSidebar extends React.Component< } async getLocalContent() { - let isPagePDF = window.location.href.includes('/pdfjs/viewer.html?') - let fullTextToProcess + let isPagePDF = this.props.fullPageUrl?.includes('/pdfjs/viewer.html?') + let fullTextToProcess: string if (isPagePDF) { const searchParams = new URLSearchParams(window.location.search) const filePath = searchParams.get('file') @@ -2729,7 +2729,7 @@ export class AnnotationsSidebar extends React.Component< while (!executed) { try { if ( - isUrlYTVideo(window.location.href) + isUrlYTVideo(this.props.fullPageUrl) ) { let video = document.getElementsByTagName( 'video', @@ -2754,7 +2754,7 @@ export class AnnotationsSidebar extends React.Component< } else { executed = this.props.events.emit( 'addPageUrlToEditor', - window.location.href, + this.props.fullPageUrl, null, false, (success) => {