Add Archive.org list-all (#16), fix typo regarding google-textonly
Cette révision appartient à :
Parent
cec8d43a8c
révision
6a94c66c48
4 fichiers modifiés avec 17 ajouts et 1 suppressions
|
@ -34,6 +34,11 @@
|
||||||
"description": "with The Internet Archive"
|
"description": "with The Internet Archive"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"resurrectArchiveList": {
|
||||||
|
"message": "with The Internet Archive (list all)",
|
||||||
|
"description": "with The Internet Archive (list all)"
|
||||||
|
},
|
||||||
|
|
||||||
"resurrectArchiveIs": {
|
"resurrectArchiveIs": {
|
||||||
"message": "with archive.is",
|
"message": "with archive.is",
|
||||||
"description": "with archive.is"
|
"description": "with archive.is"
|
||||||
|
|
|
@ -36,8 +36,9 @@ chrome.storage.local.get('openIn', item => {
|
||||||
}, onCreated);
|
}, onCreated);
|
||||||
|
|
||||||
addResurrectItem(context, 'Google', 'google', 'google');
|
addResurrectItem(context, 'Google', 'google', 'google');
|
||||||
addResurrectItem(context, 'GoogleText', 'google-text', 'google');
|
addResurrectItem(context, 'GoogleText', 'googletext', 'google');
|
||||||
addResurrectItem(context, 'Archive', 'archive', 'waybackmachine');
|
addResurrectItem(context, 'Archive', 'archive', 'waybackmachine');
|
||||||
|
addResurrectItem(context, 'ArchiveList', 'archivelist', 'waybackmachine');
|
||||||
addResurrectItem(context, 'ArchiveIs', 'archiveis', 'archiveis');
|
addResurrectItem(context, 'ArchiveIs', 'archiveis', 'archiveis');
|
||||||
addResurrectItem(context, 'Webcitation', 'webcitation', 'webcitation');
|
addResurrectItem(context, 'Webcitation', 'webcitation', 'webcitation');
|
||||||
|
|
||||||
|
@ -75,6 +76,8 @@ chrome.contextMenus.onClicked.addListener(function(info, tab) {
|
||||||
goToUrl(genGoogleTextUrl(url), openIn);
|
goToUrl(genGoogleTextUrl(url), openIn);
|
||||||
} else if (id.startsWith('resurrect-archive-')) {
|
} else if (id.startsWith('resurrect-archive-')) {
|
||||||
goToUrl(genIaUrl(url), openIn);
|
goToUrl(genIaUrl(url), openIn);
|
||||||
|
} else if (id.startsWith('resurrect-archivelist-')) {
|
||||||
|
goToUrl(genIaListUrl(url), openIn);
|
||||||
} else if (id.startsWith('resurrect-archiveis-')) {
|
} else if (id.startsWith('resurrect-archiveis-')) {
|
||||||
goToUrl(genArchiveIsUrl(url), openIn);
|
goToUrl(genArchiveIsUrl(url), openIn);
|
||||||
} else if (id.startsWith('resurrect-webcitation-')) {
|
} else if (id.startsWith('resurrect-webcitation-')) {
|
||||||
|
|
|
@ -34,6 +34,11 @@ function genIaUrl(url) {
|
||||||
return 'https://web.archive.org/web/'+dateStr+'/'+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) {
|
function genArchiveIsUrl(url) {
|
||||||
return 'https://archive.is/'+url;
|
return 'https://archive.is/'+url;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,9 @@ img {
|
||||||
<button data-locale="resurrectArchive" data-gen="genIaUrl">
|
<button data-locale="resurrectArchive" data-gen="genIaUrl">
|
||||||
<img src="icons/cacheicons/waybackmachine.png">
|
<img src="icons/cacheicons/waybackmachine.png">
|
||||||
</button>
|
</button>
|
||||||
|
<button data-locale="resurrectArchiveList" data-gen="genIaListUrl">
|
||||||
|
<img src="icons/cacheicons/waybackmachine.png">
|
||||||
|
</button>
|
||||||
<button data-locale="resurrectArchiveIs" data-gen="genArchiveIsUrl">
|
<button data-locale="resurrectArchiveIs" data-gen="genArchiveIsUrl">
|
||||||
<img src="icons/cacheicons/archiveis.png">
|
<img src="icons/cacheicons/archiveis.png">
|
||||||
</button>
|
</button>
|
||||||
|
|
Chargement…
Référencer dans un nouveau ticket