Update Archive Site Links to 1.1.0
- Show archive links even for the same archiver
This commit is contained in:
parent
a91831ee70
commit
387213d063
|
@ -4,7 +4,7 @@
|
|||
// @match http*://*/*
|
||||
// @grant GM_openInTab
|
||||
// @grant GM_registerMenuCommand
|
||||
// @version 1.0.0
|
||||
// @version 1.1.0
|
||||
// @author blankie
|
||||
// @description Adds buttons to the monkey menu to open/archive in the Wayback Machine and archive.today
|
||||
// @inject-into content
|
||||
|
@ -72,21 +72,19 @@ for (const ARCHIVE_SITE of ARCHIVE_SITES) {
|
|||
|
||||
let archiveSites = 0;
|
||||
for (const ARCHIVE_SITE of ARCHIVE_SITES) {
|
||||
if (onArchiveSite === ARCHIVE_SITE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (archiveSites !== 0) {
|
||||
GM_registerMenuCommand("=".repeat(20) + "\u200B".repeat(archiveSites), function() {});
|
||||
}
|
||||
archiveSites++;
|
||||
|
||||
if (ARCHIVE_SITE !== onArchiveSite) {
|
||||
GM_registerMenuCommand(`Open in ${ARCHIVE_SITE.name}`, function() {
|
||||
window.location.href = ARCHIVE_SITE.getArchivedUrl(url);
|
||||
});
|
||||
GM_registerMenuCommand(`Open in ${ARCHIVE_SITE.name} (new tab)`, function() {
|
||||
GM_openInTab(ARCHIVE_SITE.getArchivedUrl(url));
|
||||
});
|
||||
}
|
||||
|
||||
let urlObject = new URL(url);
|
||||
urlObject.hash = "";
|
||||
|
|
Loading…
Reference in New Issue