Thegreatsuspender: Feature Request: Remember pdf scroll location

Created on 21 Feb 2019  路  13Comments  路  Source: greatsuspender/thegreatsuspender

I often have 2 or 3 PDF files that I am referring to while programming. It's quite annoying to find that the tab has been suspended - which means I lost the current read location.

I suppose I could do a "never suspend this URL", but I really only want to preserve this one PDF file, not the entire site.

feature

Most helpful comment

How about putting a regex into the whitelist?

/\.[pP][dD][fF](?:\?.*)?(?:#.*)?$/

All 13 comments

I guess u could use pause suspension option for PDF tab, which will temporarily (until tab is reloaded) pause it. Also what version of TGS extension u r using? Look for it on Extensions page in Chrome settings.

fuck chrome extension overlay policy lol

7.0.104 is there a newer version?

@MReed1959, well latest Chrome Web Store TGS version is 7.0.109, developer not frequently updates it there for reasons, but u could try latest TGS dev build 7.0.173 c245df543f615a018d1e2fb15d00a83fb84ee8fc, a lot was fixed since 109, but as I just checked with 173 installed, TGS does not save scroll pos in Chrome PDF, which may be an issue, but it has rmb "pause/unpause suspension of this tab" option, that's for sure, + "not now"/"unpause" when u click on extension itself in Chrome toolbar. About how to try dev build I wrote here, and I would add now that there may be no need to remove current Web Store version, just disable it and install dev unpacked is enough I guess, along with other backup/restore instructions. Aand I think there may be no need for you to try dev version right now if urs current 7.0.104 has pause option (can't remember if it does), it should be ok then, but if this PDF scroll thing is actually an issue and gets fixed by developer, latest dev build will have those fixes so u could try it later, just in case wrote u how to.

How about putting a regex into the whitelist?

/\.[pP][dD][fF](?:\?.*)?(?:#.*)?$/

How about putting a regex into the whitelist?

/\.[pP][dD][fF](?:\?.*)?(?:#.*)?$/

That is brilliant! I didn't even know the whitelist supported regex. I've installed it right away.

I've updated the title to reflect the real issue. Not sure if there's anything I can do about this though :(
Here's a relevant SO question about detecting scroll position of embedded pdfs: https://stackoverflow.com/questions/33798543/detect-if-a-user-scrolls-to-the-bottom-of-an-embedded-pdf

Just for completeness, here's the canonical thread for whitelisting pdfs: #257

How about putting a regex into the whitelist?

/\.[pP][dD][fF](?:\?.*)?(?:#.*)?$/

That is brilliant! I didn't even know the whitelist supported regex. I've installed it right away.

Does not work. The whitelist is for URLs, the PDF may not be indicated in the URL.
For example: https://www.cypress.com/file/177971/download

The page is a PDF, the URL is https://www.cypress.com/file/177971/download

@MReed1959 unfortunately that is an edge case i doubt we'll be able to handle. i've checked the tab meta info provided by the chrome API for that url, and there is nothing in there to indicate to me that it's displaying a pdf. there's no way of distinguishing this from any other 'normal' tab.

it seems that checking for '.pdf' in the url is that only option we have at this point.

---------- EDIT ----------
actually, if we inspect the dom of that tab, it does show an embedded pdf element:

<embed width="100%" height="100%" name="plugin" id="plugin" src="https://www.cypress.com/file/177971/download" type="application/pdf" internalinstanceid="5">

we could potentially use this to detect tabs containing a pdf.

7.0.104 is there a newer version?

@MReed1959 the latest is x.182 see the wiki for a bit more ;)

7.0.104 is there a newer version?
the latest is x.182 see the wiki for a bit more ;)

run smoothly here lol

I hope this can be implemented someday.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philoupd picture philoupd  路  3Comments

minig0d picture minig0d  路  4Comments

lookfirst picture lookfirst  路  3Comments

elig0n picture elig0n  路  4Comments

brycenesbitt picture brycenesbitt  路  4Comments