Solved Copy Page Title
-
Add Copy Page Title to the Tab Context Menu
Many image and pdf downloads use a name that doesn't mean anything to human language when stashed on a CDN. It would be helpful if there was a way to copy the page title from right clicking the page or right clicking the tab. Another helpful possibility might be to have a checkbox in the save/save as dialog that would allow you to replace the item being downloading with the title of the page that called the GET.
Since a picture is worth a thousand words, here's an example showing flickr's filename that would make a better password than a filename describing the contents;
Basically I'm interested in a streamlined way to snag the page title, without opening source or dev tools, so I can replace the filename when I save as; or a checkbox in the save as dialog that would replace the filename with the page title of the referrer.
--
ModEdit: Title
--
selfEdit: thing i forgot
I neglected to mention that it would preferably need to remove chars invalid for filenames and possibly replace spaces with hyphens or underscores.
-
This could be solved with a command chain:
Command 1:
Open Link in Current Tab
Command Parameter:javascript:navigator.clipboard.writeText(document.title);
Alternatively, add this as the Command Parameter, in order to preserve the URL in the address field:
javascript:navigator.clipboard.writeText(document.title);history.replaceState({},"",location.href);
The command chain can be added to a context menu, as well as being assigned to a keyboard shortcut or a mouse gesture. Learn more about command chains. Check out more command chain recipes from our community.
-
hey, @pafflick , I think javascript can do this, like rename the tabs, which can added to context menu.
you can ask one of the devs, if they can help.
-
@juanvase
Copy Title
javascript:(function(){e = document.createElement('textarea');e.textContent = document.title;document.body.appendChild(e);e.select();document.execCommand('copy');e.remove();})();
Copy URL
javascript:(function(){e = document.createElement('textarea');e.textContent = document.URL;document.body.appendChild(e);e.select();document.execCommand('copy');e.remove();})();
reference URL:
https://2ndart.hatenablog.com/entry/2019/07/19/121348 -
This could be solved with a command chain:
Command 1:
Open Link in Current Tab
Command Parameter:javascript:navigator.clipboard.writeText(document.title);
Alternatively, add this as the Command Parameter, in order to preserve the URL in the address field:
javascript:navigator.clipboard.writeText(document.title);history.replaceState({},"",location.href);
The command chain can be added to a context menu, as well as being assigned to a keyboard shortcut or a mouse gesture. Learn more about command chains. Check out more command chain recipes from our community.
-
Ppafflick marked this topic as a question on
-
Ppafflick has marked this topic as solved on
-
Ppafflick moved this topic from Desktop Feature Requests on
-
This is very nice. I have put the command chain in tab's context menu.
But it can only work with HTTPS sites, not with HTTP sites, such as the following:
-
@pafflick said in Copy Page Title:
Alternatively, add this as the Command Parameter, in order to preserve the URL in the address field:
javascript:navigator.clipboard.writeText(document.title);history.replaceState({},"",location.href);HI!
This used to work, but ain't working now, I guess the update broke it, 'm thinking maybe due to Manifest v3 or smth maybe.
'm currently on
Vivaldi 5.5.2805.48 (Stable channel)
i was onVivaldi 5.2.2623.41 (Stable channel)
Can u please post an updated working solution?
-