-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Direct links don't work (reliably?) if target page embeds the client #1355
Comments
Hubspot ticket: https://app.hubspot.com/contacts/6291320/record/0-5/1855939933 |
Could possibly add libretexts.org to bouncer's whitelist of sites that embed the client. |
I'm probably that report immediately above: I'm using an adaptation of Dan Whaley's DropDoc web application to generate transcripts of YouTube videos and provide a way to annotate bits of the transcript. For example, this post on Mastodon about a recent CNI briefing on JSTOR's LLM-driven bot on journal articles: https://code4lib.social/@dltj/112515330860312283. The links on that Mastodon post work fine. However, if I link to a specific Hypothes.is annotation (as I did in this Mastodon post: https://code4lib.social/@dltj/112515476692600406), the JavaScript bits that enable the reader to jump to a specific time in the YouTube recording stop working. (In other words, if you click on a transcript line in the "media.dltj.org" version of the transcript, the video player jumps to the right time. Through "via" though, it does not.) It seems like the YouTube player is not getting initialized; I see this in the console:
Digging further, the player is defined by Looking at the browser console, I see that the HTTP request is getting redirected by Via to: So I'm guessing that Hypothesis has blocked that bit of JavaScript. Are there any known workarounds? [Now adding: I see that there are no known workarounds. Also...the code, in all its mid-refactoring ugliness, is on GitHub.] |
We changed the way that the bouncer service (hyp.is) activates the extension and configures the extension's client to navigate to a particular annotation. This has ended up breaking direct links to annotations on target pages that embed the client.
Example bouncer link: https://hyp.is/zxCckEH4Ee6tPkNgrU9gKw/chem.libretexts.org/Courses/University_of_Arkansas_Little_Rock/Chem_1403%3A_General_Chemistry_2/Text/10%3A_Review/10.01%3A_Lewis_Dot_Structures
If you follow this link in a Chrome browser that has our extension installed, what happens is:
src/background/index.ts
) and initiates the navigationWhen the target page does not embed the client, this all works fine. The problem comes when the target page embeds the client. In this case step (3) will inject configuration into the page, but the extension's client does not activate because the embedded client is already there. The embedded client meanwhile will probably not read this configuration because it was not present in the page when the embedded client initially loaded.
Some possible solutions:
Slack thread: https://hypothes-is.slack.com/archives/C2C2U40LW/p1693313716998819?thread_ts=1692964809.673489&cid=C2C2U40LW
The text was updated successfully, but these errors were encountered: