diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 430a3d0..3a2a904 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -34,6 +34,11 @@ "description": "with The Internet Archive" }, + "resurrectArchiveList": { + "message": "with The Internet Archive (list all)", + "description": "with The Internet Archive (list all)" + }, + "resurrectArchiveIs": { "message": "with archive.is", "description": "with archive.is" diff --git a/background.js b/background.js index fb62f96..01e89c8 100644 --- a/background.js +++ b/background.js @@ -36,8 +36,9 @@ chrome.storage.local.get('openIn', item => { }, onCreated); addResurrectItem(context, 'Google', 'google', 'google'); - addResurrectItem(context, 'GoogleText', 'google-text', 'google'); + addResurrectItem(context, 'GoogleText', 'googletext', 'google'); addResurrectItem(context, 'Archive', 'archive', 'waybackmachine'); + addResurrectItem(context, 'ArchiveList', 'archivelist', 'waybackmachine'); addResurrectItem(context, 'ArchiveIs', 'archiveis', 'archiveis'); addResurrectItem(context, 'Webcitation', 'webcitation', 'webcitation'); @@ -75,6 +76,8 @@ chrome.contextMenus.onClicked.addListener(function(info, tab) { goToUrl(genGoogleTextUrl(url), openIn); } else if (id.startsWith('resurrect-archive-')) { goToUrl(genIaUrl(url), openIn); + } else if (id.startsWith('resurrect-archivelist-')) { + goToUrl(genIaListUrl(url), openIn); } else if (id.startsWith('resurrect-archiveis-')) { goToUrl(genArchiveIsUrl(url), openIn); } else if (id.startsWith('resurrect-webcitation-')) { diff --git a/common.js b/common.js index 6d191ce..781c689 100644 --- a/common.js +++ b/common.js @@ -34,6 +34,11 @@ function genIaUrl(url) { return 'https://web.archive.org/web/'+dateStr+'/'+url; } +function genIaListUrl(url) { + let dateStr =(new Date()).toISOString().replace(/-|T|:|\..*/g, ''); + return 'https://web.archive.org/web/*/'+url; +} + function genArchiveIsUrl(url) { return 'https://archive.is/'+url; } diff --git a/popup.htm b/popup.htm index 0a465db..f3881b9 100644 --- a/popup.htm +++ b/popup.htm @@ -30,6 +30,9 @@ img { +