hypothes.is annotation service fails Topic is solved

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

hypothes.is annotation service fails

Unread post by moonbat » 2022-11-15, 05:33

The site is an online annotation service, offering a bookmarklet so you can highlight text on any webpage and press it to add your own comments. It used to work with PM until recently (I had forgotten about it and tried it again now after about a year or so)

Code: Select all

"The Hypothesis annotation tool is not supported in this browser. See https://web.hypothes.is/help/which-browsers-are-supported-by-hypothesis/."
I've tried using these overrides

Code: Select all

Mozilla/5.0 (%OS_SLICE% rv:86.0) Gecko/20100101 Firefox/86.0 (Pale Moon)
Mozilla/5.0 (%OS_SLICE% rv:68.9) Gecko/20100101 Firefox/68.9 (Pale Moon)
to no avail.
Is it possible to fix this with a SSUAO or should I give up and hope they won't ignore my mail to them about this?
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Toa-Nuva
Fanatic
Fanatic
Posts: 199
Joined: 2015-06-04, 18:12

Re: hypothes.is annotation service fails

Unread post by Toa-Nuva » 2022-11-15, 06:33

At a quick glance:
This is the code that is called by the bookmarklet: https://cdn.hypothes.is/hypothesis
Since it's not too big, I tried putting that into a Javascript beautifier, and it turns out that they actually do some feature detection:

Code: Select all

    if (function() {
            var s = [function() {
                return Promise.resolve()
            }, function() {
                return new Map
            }, function() {
                return new URL(document.location.href)
            }, function() {
                return new Request("https://hypothes.is")
            }, function() {
                return Element.prototype.attachShadow
            }, function() {
                return CSS.supports("display: grid")
            }, function() {
                return document.evaluate("/html/body", document, null, XPathResult.ANY_TYPE, null), !0
            }];
            try {
                return s.every((function(s) {
                    return s()
                }))
            } catch (s) {
                return !1
            }
        }()) {
        // some more code here
    } else console.warn("The Hypothesis annotation tool is not supported in this browser. See https://web.hypothes.is/help/which-browsers-are-supported-by-hypothesis/.")
In my tests, Element.prototype.attachShadow returns undefined (which is falsy) in Pale Moon, so this would fail the feature detection. And since they do use actual feature detection rather than an arbitrary UA check, I would assume that the bookmarklet is actually incompatible with Pale Moon currently.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: hypothes.is annotation service fails

Unread post by moonbat » 2022-11-15, 06:36

Toa-Nuva wrote:
2022-11-15, 06:33
Element.prototype.attachShadow
Shadow DOM :cry:
That's not supported by Pale Moon yet. Thank for taking a look.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Locked