Hi ALL,
In this code when i call copyAllLinksOnCurrentTab it copies all links
So,
can anyone help me modifying this code so that when I call copyAllLinksOnCurrentTab
it will copy the current tab title then the links then close the tab
Thanks
this is the code:
https://js.do/mazenhelmi000/470937
I can only give you some pointers.
To get page (tab) title from content script, use βdocument.title
β.
To get tab title from background script, you can access it through the βtabβ object. See: tabs.Tab - Mozilla | MDN
(tab object is returned by many βbrowser.tabs
β API.
To close tab use "browser.tabs.remove"
: tabs.remove() - Mozilla | MDN
Happy coding!
1 Like
Thanks Anyway, I coded it successfully, here the addon:
The modified code is in js\background.js
link here
1 Like