Skip to content
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

Some annotations with hrefs not clickable #15

Open
garlic-os opened this issue Aug 3, 2023 · 2 comments
Open

Some annotations with hrefs not clickable #15

garlic-os opened this issue Aug 3, 2023 · 2 comments

Comments

@garlic-os
Copy link

Almost none of the annotations in Rewind YouTube Style 2012 are clickable, even though their data contains a URL.

As an example, on this screen, the annotations over "PSY" and "WalkOffTheEarth" are clickable, but the ones for the "YouTube Rewind 2012" message and "Watch the Behind the Scenes" are not:
image

Here is Psy's annotation which works as expected:

<annotation id="annotation_855985" type="highlight" log_data="a-id=annotation_855985&amp;a-type=3&amp;a-v=iCkYw3cRwLo&amp;ei=PLs9XJSRMOGp8QPwuq64Bg&amp;l-class=3&amp;link=http%3A%2F%2Fwww.youtube.com%2Fuser%2Fofficialpsy&amp;xble=1" itct="">
  <segment>
    <movingRegion type="rect">
      <rectRegion x="54.68800" y="9.16700" w="40.00000" h="40.55600" t="0:03:21.6"/>
      <rectRegion x="54.68800" y="9.16700" w="40.00000" h="40.55600" t="0:03:27.0"/>
    </movingRegion>
  </segment>
  <appearance bgColor="16777215" highlightWidth="3" borderAlpha="0.25"/>
  
  <action type="openUrl" trigger="click">
    <url target="new" value="https://www.youtube.com/user/officialpsy?annotation_id=annotation_855985&amp;ei=PLs9XJSRMOGp8QPwuq64Bg&amp;feature=iv&amp;src_vid=iCkYw3cRwLo" link_class="3"/>
  </action>

</annotation>

and this is the Behind the Scenes annotation, which is not clickable even though its data has an openURL click action:

<annotation id="annotation_817107" type="highlight" log_data="a-id=annotation_817107&amp;a-type=3&amp;a-v=iCkYw3cRwLo&amp;ei=PLs9XJSRMOGp8QPwuq64Bg&amp;l-class=12&amp;link=http%3A%2F%2Fgoo.gl%2FGkU8M&amp;xble=1" itct="">
  <segment>
    <movingRegion type="rect">
      <rectRegion x="11.87500" y="56.94400" w="29.84400" h="30.00000" t="0:03:21.6"/>
      <rectRegion x="11.87500" y="56.94400" w="29.84400" h="30.00000" t="0:04:06.7"/>
    </movingRegion>
  </segment>
  <appearance bgColor="16777215" highlightWidth="3" borderAlpha="0.25"/>
  
  <action type="openUrl" trigger="click">
    <url target="new" value="http://goo.gl/GkU8M" link_class="12"/>
  </action>

</annotation>

I think the problem is that the parser is ignoring goo.gl URLs.

if (href.startsWith("https://www.youtube.com/")) {

@isaackd
Copy link
Owner

isaackd commented Sep 9, 2023

Appreciate you looking into this! I agree that the check should be removed. Clients using the renderer can easily decide whether they want to redirect outside youtube.com

@isaackd
Copy link
Owner

isaackd commented Sep 10, 2023

Fixed in ce8ea7e. I'll release an update to the extension including this change as soon as I can

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants