-
-
Notifications
You must be signed in to change notification settings - Fork 623
Clickable links in description of both Subscriptions and Search Results page. #2889
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
Clickable links in description of both Subscriptions and Search Results page. #2889
Conversation
…criptions page and Search Results page
thanks! @wbalbo (or if something is has no possible disadvantage and actually make sense to run for every users, then we will first ponder about possible side effects first and how to tune the code) |
Hello, thanks for looking into. The only "disadvantage" on this is the context menu not appearing on a right click for videos with links in the description, I guess it's not a huge disadvantage anyway. I am not sure if a toggle is really necessary for this feature, but let me know what you think. My change was really adding an event listener to the ContextMenu event to look for URLs using Regex. If the video doesn't have a link, the context menu will appear as normal; if it does, it will copy the first URL found (only the first) to the clipboard, and then you can paste it into a new tab. |
A feature, that will be manually enabled by who misses it enough to search for it or looks through our whole list A feature enabled for everybody is easily more complex. Then we better avoid all side effects (keep the context menu) |
Ok, I should create a toggle for this, then. Where do you suggest? Thanks. |
… also moving the logic from core.js to the general.js file.
Thank you! Now it can easily be merged and released to a million people (ruling out frequent side effect) I just added a label to this repo: "Feature enabled by default" (Good for almost everyone?) |
Thanks! Yes, I agree that in this specific case is a feature good for practically everyone. Glad to help! |
And chosing the oldest relevant issue can be strategic since it persists for so long and is not subject to Youtube's changes and @xinitrc-dev still reacting proves it's longevity too
How much did you try with this?
( https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts )
|
Oh yeah, I used only document_idle to be honest because it was the best solution for me. At document_start, I didn't have time to properly catch the specific CSS to do the trick of replacing the context menu to copy to clipboard, until I discovered today that it could be done in the general.js for this specific scenario. I think document_idle is the best idea for a lot of things in the code, but obviously, this should be done carefully and one thing at a time. Thanks for removing, I completely forgot haha. |
to make it iintutive/self-explanatory when enabled by default: "copy with one click" could be a sub-option Or, in between: we could suggest user to enable features, or define defaults by certain cohort of users. |
This should solve the issue: #48
Let me know if anything is wrong.