Gviewer iframe loading bug

Hello,

I am using GitHub and google viewer to host&render pdf in my tiddlywiki notebook. There is a bug in viewer that causes fails with iframe loads, and there are hacks with refresh until success.

How can I put this in my tiddlywiki notebook? It seems I can do it with javascript tiddys? But not quite sure how to approach it.

Hi @farukozderim one of the StackOverflow answers you linked to suggests that it can be fixed by using the <object> tag instead of <iframe>. For example:

<object width="100%" height="100%" data="https://docs.google.com/gview?embedded=true&url=https://github.com/FarukOzderim/PhD-Courses/raw/master/pdfs/566-L6.pdf" type="application/pdf">
  <embed src="https://docs.google.com/gview?embedded=true&url=https://github.com/FarukOzderim/PhD-Courses/raw/master/pdfs/566-L6.pdf" type="application/pdf">
    <p>This browser does not support PDFs.Please download the PDF to view it: <a href="https://docs.google.com/gview?embedded=true&url=https://github.com/FarukOzderim/PhD-Courses/raw/master/pdfs/566-L6.pdf">Download PDF</a>.</p>
    </embed>
</object>

If that works OK we can work it up into a global macro to make it easier to invoke.