Skip to content

Latest commit

 

History

History
9 lines (8 loc) · 1005 Bytes

archivetoday-js.md

File metadata and controls

9 lines (8 loc) · 1005 Bytes
title date categories
ArchiveToday.Js
2023-11-23
useful-script-en

how to add bookmarklet in chrome
import { getCurrentTab } from “./helpers/utils.js”; export default { icon: `https://archive.ph/favicon.ico`, name: { en: “Archive the current Page online”, vi: “Lưu trữ online trang hiện tại”, }, description: { en: “Creates an archive of the current page on archive.today.”, vi: “Lưu trang web hiện tại lên archive.today”, }, onClickExtension: async function () { let { url } = await getCurrentTab(); var a = prompt( “Nhập URL muốn tạo archive: “, url.replace(/^http\:\/\/(.*)$/, “$1”) ); if (a != null) { window.open(“https://archive.today/?run=1&url=” + encodeURIComponent(a)); } }, };