ynshung / better-yt-shorts

Playback, volume, timestamp controls and more on YouTube Shorts.
GNU General Public License v3.0
246 stars 43 forks source link

Feature Request: Return Links to the Comment Section #96

Open HealingArcYT opened 1 year ago

HealingArcYT commented 1 year ago

So YT recently removed links in the comments, for anti scam reasons. But i dont really like it, could you maybe add an option to bring them back, maybe as an optional feature that you can activate/deactivate using a switch in the better ytshorts extension menu?

adsuth commented 1 year ago

If youtube is specifically not loading/showing the content, we also won't have access to it unfortunately so I dont think this is within the scope of this project

HealingArcYT commented 1 year ago

link gets shown, but its not a hyperlink but plain text, so it definitely is within here

adsuth commented 1 year ago

Ah right. Yeah this should be possible. Just a case of:

The obvious issue is the efficiency of this given that we'd be checking hundreds of comments every couple of hundred milliseconds. Though I guess we could make a new interval that only runs every second or so, and only execute the checks if the comments panel is open.

Could you send an example of a short with a link in the comments (preferably at the top) so we can have something to work with if we do want to try implement this

HealingArcYT commented 1 year ago

this is the first one i found

adsuth commented 1 year ago

Planning on incorporating this into the v3 release

HealingArcYT commented 1 year ago

Oh and i have another thing to add. Some Videos have links in the description, but youtube usually replaces them with a link to a youtube domain that redirects the user to the page that is the actual goal, could you maybe figure out a way to make them direct links instead of redirections?

adsuth commented 1 year ago

If someone could write me a selector for the description text I'd happily incorporate that as well. Having trouble making it unique to each short description

HealingArcYT commented 1 year ago

I just saw, they also removed these links from shorts descriptions

HealingArcYT commented 1 year ago

this is the first one i found

the Short mentioned earlier also has Links in its Description

HealingArcYT commented 1 year ago

If someone could write me a selector for the description text I'd happily incorporate that as well. Having trouble making it unique to each short description

well this

document.getElementsByTagName("ytd-engagement-panel-section-list-renderer")[2]

gives the whole container with the description. but how to get on from there i have to try

HealingArcYT commented 1 year ago

well this very unbeatiful thing gets you there, for now

document.getElementsByTagName("ytd-engagement-panel-section-list-renderer")[2].children[1].children[0].children[0].children[1].children[0].children[0].children[0].children[1]

as i said, very unbeatiful

HealingArcYT commented 1 year ago

(gives you a TypeError if there is no description, so you need to find out where and check if there are children left at that point)

HealingArcYT commented 1 year ago

which I think I might have found, if this has more than 1 child in it you should have a description, else not

document.getElementsByTagName("ytd-engagement-panel-section-list-renderer")[2].children[1].children[0].children[0].children