mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-09 03:16:36 +00:00
copy all urls in split view
This commit is contained in:
@@ -60,10 +60,12 @@ class ZenPreloadedFeature {
|
||||
|
||||
var gZenCommonActions = {
|
||||
copyCurrentURLToClipboard() {
|
||||
const currentUrl = gBrowser.currentURI.spec;
|
||||
if (currentUrl) {
|
||||
const currentTabs = gZenViewSplitter.getTabsInCurrentView()
|
||||
if (currentTabs) {
|
||||
const stringArray = currentTabs.map(t => `${t.linkedBrowser.currentURI.spec}`)
|
||||
const markdownString = stringArray.join("\n")
|
||||
let str = Cc['@mozilla.org/supports-string;1'].createInstance(Ci.nsISupportsString);
|
||||
str.data = currentUrl;
|
||||
str.data = markdownString;
|
||||
let transferable = Cc['@mozilla.org/widget/transferable;1'].createInstance(Ci.nsITransferable);
|
||||
transferable.init(getLoadContext());
|
||||
transferable.addDataFlavor('text/plain');
|
||||
|
Reference in New Issue
Block a user