diff --git a/archivebox/templates/core/snapshot_live.html b/archivebox/templates/core/snapshot_live.html index 33ea3f60..364451e9 100644 --- a/archivebox/templates/core/snapshot_live.html +++ b/archivebox/templates/core/snapshot_live.html @@ -435,12 +435,14 @@ this.src = this.src + '#toolbar=0' } this.onload = function() { - this.contentWindow.scrollTo(0, 0); - // this.src = this.src if (this.src.endsWith('.pdf')) { this.removeAttribute('sandbox') this.src = this.src + '#toolbar=0' } + try { + // doesnt work if frame origin rules prevent accessing its DOM via JS + this.contentWindow.scrollTo(0, 0); + } catch(err) {} } })