isaackd/AnnotationsRestored

Don't attempt to load annotations on videos that can't possibly have annotations.

Closed this issue · 5 comments

foxt commented

Currently, the extension will always try to load annotations, even on videos uploaded after annotations where removed.

Not sure how the extension works, however you could use something like the following (for Polymer):

if (new Date(document.querySelector("#date > yt-formatted-string.ytd-video-primary-info-renderer").innerText) > 1493852400000) {
    abortLoadingAnnotations()
}

This text is localized and so this might break for non-english users.

foxt commented

I'm not sure what some examples of localised strings are, but does JS not handle localized strings?

No, it does not. In SponsorBlock, I fetch the YouTube API to get the date in a more for sure readable form due to this issue. Either solution would slow the extension down a bit though as the request would have to wait until things are loaded instead of right after the tab first changes.

The month name and order is different in each language.

foxt commented

Yeah, in that case I think this is a wontfix.