Are you sure you want to go to an external site to donate a monetary value?
WARNING: Some countries laws may supersede the payment processors policy such as the GDPR and PayPal. While it is highly appreciated to donate, please check with your countries privacy and identity laws regarding privacy of information first. Use at your utmost discretion.
Likely due to layout changes on YouTube's side, I had to change the CSS so that the overlay does is not partially on the seek bar. Specifically, I had to change to the following:
.ytp-arc-list { bottom: 5em }
This seems to match the other YouTube button menu overlays. Though they don't seem to use the bottom property at all. If you ever refactor, it might make sense to keep the existing classes and styling, and only add additional content to the styling.
For me, though, the above is sufficient.
For the record, the stuff you said here is incorrect. @match runs in native browser code. @include only partially does, due to not working quite the same way as iunclude_globs in manifest.json. The one thing that runs entirely in the userscript engine are Regex matches. And, if you don't include any sort of @match, your regex will run on every page.
Your regex is exactly equivalent to the @match code I included above. (Using * for the protocol is defined to be http or https only, and does not match other protocols.) And the @match will run better. @include has been "not recommended" and not used in userscripts for a long time. And @include /regex/ has in fact been discussed to be removed, and in fact is not implemented in many newer and lighter userscript engines.
I leave this here not because you didn't already figure this out yourself (as your WebExtension versions use match in manifest.json). But so that other developers don't see this and assume that @include /regex/ is the way to go. Use @match for as much as you can, and then you can use @include if you need to be more specific. And, if you need to use regex, just use this simple one liner
if (!/your_regex/.test(location.href)) { return; }
In fact I'd personally recommend that you write your code to fail gracefully if it's running where it shouldn't. It's just less work in the future.
When the YouTube video has chapters (e.g. https://www.youtube.com/watch?v=WB7OfwTvJ6c), the aspect ration button does not appear. In fact, the entire
ytp-center-controls
class does not appear, and Chrome's inspector shows it is below the frame.I had to add in a workaround that just prepends 'ytp-arc-list
and
ytp-arc-buttonto the
ytp-right-controls` class. Doing this seems to work whether the video has chapters or not.Your
@include
appears to be exactly identical in functionality to// @match *://www.youtube.com/*
As a general rule,
@match
is more reliable and performant than using include regex. It's less likely to break, seeing as it's a part of the Chrome addon specification (and the newer WebExtensions spefication). It's also more widely supported on different UserScript engines. There have even been talks of removing the regex feature of@include
.You can read more about match patterns here.
It's annoying to me that I have to log in every time I come here. Chrome won't even remember my username, since you don't have a password box. So I even have to type in my username.
I'd prefer to just stay logged in. I'm still logged in on Github, so I should be logged in here.
(Apologies if this is the wrong forum: there doesn't seem to be any that are specifically for the OpenUserJS website instead of about the scripts. This looks the closest.)