-
Notifications
You must be signed in to change notification settings - Fork 103
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
Proper RedGIFs Sound Controls with Userscript #168
base: master
Are you sure you want to change the base?
Conversation
…nd is on. No effect on users not using the userscript.
… messages to embedded redgifs iframes when toggled.
Closes #167 Well not technically, but it seems that unless redgifs decides to natively permit this little API (it's an API, right?) this is the closest we'll get. |
I realize that a change that only affects users who have an unrelated nonstandard script installed is maybe a bit of a hard sell, which is why I went so far as to implement it myself. It might be good to figure out some way to notify the user that they could enhance their experience using this script. Perhaps However, even without that, this will still work very well for whatever small number of people use the script. |
…n off links (the "image" button does the same thing); allowed it to disable looping (for the next thing I'm doing); made it detect if the userscript that does all these things is actually, yknow, installed
… ugly thing to search for them while excluding iframes created by extensions. Should've thought of that in the first place.
…ives the gfy_ended signal. This one makes it disable the auto-next timer when it sees a gfy image AND rp.session.gfy_enhanced_api is set. It skips to next on a timer when typical when the script isn't present, but waits when it is.
I know I said it exceeded my abilities, but it turned out it did not.
I have made a userscript, which works with ViolentMonkey on Firefox (likely works on some other configurations, but does not work with Greasemonkey on Firefox), which provides a teeny tiny little API to allow sites to control RedGIFs embeds for users via URL manipulation and/or message passing.
The main purpose of this is to allow the sound checkbox to actually affect embedded redgifs images. This is beneficial to many users, such as users with disabilities who may have a hard time manipulating the mouse to enable sound for each individual image.
Users who do not have the script installed will notice no difference. Users who do have the script installed should have a seamless experience.
This should work so long as RedGIFs does not maliciously block it from working.