title | date | categories | |
---|---|---|---|
DocDownloader.Js |
2023-11-23 |
|
how to add bookmarklet in chrome
import { getCurrentTab } from "./helpers/utils.js"; export default { icon: "https://docdownloader.com/public/img/apple-icon-180×180.png", name: { en: "DocDownloader – Download document", vi: "DocDownloader – Download document", }, description: { en: "Download document on Scribd, Issuu, Slideshare, Academia", en: "Download document from Scribd, Issuu, Slideshare, Academia", }, onClickExtension: async () => { let tab = await getCurrentTab(); let url = prompt("Enter document URL:", tab.url); if (url == null) return; window.open("https://docdownloader.com/?url=" + URL); }, };