-
Notifications
You must be signed in to change notification settings - Fork 886
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
Copy in-app links as YouTube links #2951
Copy in-app links as YouTube links #2951
Conversation
} | ||
|
||
return [{ | ||
label: 'Copy Lin&k', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing the & is a typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it makes that context menu entry activatable by clicking on it or pressing the k
key while the context menu is open. As electron-context-menu does the same (https://github.com/sindresorhus/electron-context-menu/blob/main/index.js#L167) I thought it would be a good idea to copy it, so that the behaviour is the same (I should probably add it for the Select All option as well).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh cool, didnt know that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add code comment for it :S
|
I can definitely do However doing an Invidious one is not going to be clean. The current Invidious instance is stored in the individual renderer processes, each renderer process (browser window) can have a diffferent invidious instance, unlike renderer to main ipc, you can't send replies when doing main to renderer, the only option is to send a separate ipc message to a different handler, so not what we want for the context menu. |
In that case |
For invidious, you could just need to use the link "https://redirect.invidious.io/", that way anyone that goes to that link can choose which instance they want 🙂 |
Copy in-app links as YouTube links
Pull Request Type
Related issue
closes #2479
Description
Currently all links in FreeTube, in-app and external ones, have the "Copy Link" context menu entry. This PR changes it to only show up on external links and certain in-app ones, to make it useful on the in-app ones it also transforms them into their YouTube equivalents. This means that you can copy the link to a video just by right clicking on it in the search results.
Testing
Desktop