Skip to content
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

I need the title in the first line and the url in the second line, how should I set it? #5

Open
AlbertWang2018 opened this issue Jan 27, 2022 · 10 comments

Comments

@AlbertWang2018
Copy link

No description provided.

@iamqiz
Copy link

iamqiz commented May 26, 2022

试了%T\n%U 不行
如果你想复制标签(tab)的标题和url,
你可以使用 tabcopy 这个插件,支持自定义
或者 添加一个书签,内容如下,来复制标签的标题和url

javascript:(function(){ const el = document.createElement('textarea'); el.value = decodeURIComponent(document.title + '\n' + document.URL+ ' '); document.body.appendChild(el); el.select(); document.execCommand('copy'); document.body.removeChild(el); })();

如果你想复制链接的
我目前没发现可以定制格式的插件 😂

@AlbertWang2018
Copy link
Author

感谢回复。万能的js,这个好。这个插件要是功能多点就好了。例如允许标题一行link一行,或者允许正则,因为很多link带参数,我想去掉没用的参数部分,目前是用 link cleaner 实现的。

@jimjoh
Copy link

jimjoh commented Sep 26, 2024

Adding the ability to customize the format with special control characters line newline (\n) would be very helpful. If I could get the URL on a second line it would meet my needs.

@iamqiz
Copy link

iamqiz commented Sep 26, 2024

@iamqiz
Copy link

iamqiz commented Sep 26, 2024

@AlbertWang2018 你可以下载一个油猴(https://chromewebstore.google.com/detail/%E7%AF%A1%E6%94%B9%E7%8C%B4/dhdgffkkebhmkfjojejmpbldmpobfkfo 篡改猴) 然后用js写, 正则也能支持, 而且可以有多个菜单,这样能复制多种格式 , 菜单长这样:
PixPin_2024-09-27_06-49-32

@jimjoh
Copy link

jimjoh commented Sep 27, 2024

@jimjoh try TabCopy : https://chromewebstore.google.com/detail/tabcopy/micdllihgoppmejpecmkilggmaagfdmb

Thanks for the suggestion. Unfortunately, I'm locked down to using Edge and I can't find TabCopy in the Edge extension store.

@jimjoh
Copy link

jimjoh commented Sep 27, 2024

@AlbertWang2018 你可以下载一个油猴(https://chromewebstore.google.com/detail/%E7%AF%A1%E6%94%B9%E7%8C%B4/dhdgffkkebhmkfjojejmpbldmpobfkfo 篡改猴) 然后用js写, 正则也能支持, 而且可以有多个菜单,这样能复制多种格式 , 菜单长这样: PixPin_2024-09-27_06-49-32

I was hoping for an easier solution, but this could work, thanks.

@iamqiz
Copy link

iamqiz commented Sep 27, 2024

@jimjoh try TabCopy : https://chromewebstore.google.com/detail/tabcopy/micdllihgoppmejpecmkilggmaagfdmb

Thanks for the suggestion. Unfortunately, I'm locked down to using Edge and I can't find TabCopy in the Edge extension store.

@jimjoh you can install chrome extension into edge , because chrome and edge are both chromium-based browser,they use same extension package format

@AlbertWang2018
Copy link
Author

@jimjoh try TabCopy : https://chromewebstore.google.com/detail/tabcopy/micdllihgoppmejpecmkilggmaagfdmb

javascript:(function(){ const el = document.createElement('textarea'); el.value = decodeURIComponent('[' +document.title + ']' +'\n' + document.URL.split('/?')[0]+ ' '); document.body.appendChild(el); el.select(); document.execCommand('copy'); document.body.removeChild(el); })();

In the end, I used this js to put the favorites bar to solve my needs. Thanks for your help.

@jimjoh
Copy link

jimjoh commented Sep 30, 2024

@jimjoh try TabCopy : https://chromewebstore.google.com/detail/tabcopy/micdllihgoppmejpecmkilggmaagfdmb

javascript:(function(){ const el = document.createElement('textarea'); el.value = decodeURIComponent('[' +document.title + ']' +'\n' + document.URL.split('/?')[0]+ ' '); document.body.appendChild(el); el.select(); document.execCommand('copy'); document.body.removeChild(el); })();

In the end, I used this js to put the favorites bar to solve my needs. Thanks for your help.

Javascript worked for me too, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants