Comparer les révisions

...

6 Révisions
6.2 ... master

15 fichiers modifiés avec 63 ajouts et 55 suppressions

Voir le fichier

@ -1,8 +0,0 @@
# Contributing to resurrect-pages
I love pull requests from everyone.
In fact, since I don't have much time for coding (neither much skill, I must admit),
any pull request is very welcome!
If you find a bug in the source code, you can help me by submitting an issue to this [GitHub Repository][github].
Even better you can submit a Pull Request with a fix.

Voir le fichier

@ -1,17 +1,18 @@
[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](LICENCE) - [![MAXVERSION](https://img.shields.io/badge/Firefox-57+-green.svg)](https://addons.mozilla.org/firefox/addon/resurrect-pages-isup-edition/) # resurrect-pages-isup-edition
# Documentation
# Description
Dead pages, broken links, the scourge of the internet. Dead pages, broken links, the scourge of the internet.
Powerhouse sites like Slashdot and Digg can bring a server to its knees. Powerhouse sites like Slashdot and Digg can bring a server to its knees.
What do we do when a page is dead but we still want to see it? What do we do when a page is dead but we still want to see it?
Call in the clerics, and perform a resurrection ceremony! Call in the clerics, and perform a resurrection ceremony!
Or, the easier route, use this extension. Or, the easier route, use this extension.
## Features
# Features
* Searches through six page cache/mirrors: * Searches through six page cache/mirrors:
* [Google Cache](http://www.google.com/) (plus text-only version) * [Cachew](https://cachedview.nl/)
* [The Internet Archive](http://web.archive.org/) * [The Internet Archive](http://web.archive.org/)
* [WebCite](http://www.webcitation.org/) * [WebCite](http://www.webcitation.org/)
* [archive.is](https://archive.is/) * [archive.is](https://archive.is/)
@ -27,8 +28,14 @@ Hit back and try another one!
* In the toolbar, just customize it to drag the button in. * In the toolbar, just customize it to drag the button in.
* With the keyboard: press `Ctrl-Shift-U` * With the keyboard: press `Ctrl-Shift-U`
# Changelog # Changelog
* Version 7
* Replaced Google with Cachew (Cache-view)
* Added sexy dark mode on popup
* Version 6.2.1
* Specify openerTabId for opened tabs
* Version 6.2 * Version 6.2
* changed archive.is tld to archive.md * changed archive.is tld to archive.md
* Version 6.1 * Version 6.1
@ -69,9 +76,10 @@ Hit back and try another one!
* Typo in some languages for Gigablast * Typo in some languages for Gigablast
* Removed yahoo cache (yahoo uses bing cache now) * Removed yahoo cache (yahoo uses bing cache now)
* Removed coral CDN (almost alsways dead) * Removed coral CDN (almost alsways dead)
* Version 2.1 (Sep 19, 2013) * Version 2.1 (Sep 19, 2013) FORK
* Firefox 22+ compatibility * Firefox 22+ compatibility
* Added isup.me provider * Added isup.me provider
* Version 2.0.7 (Jun 26, 2011) * Version 2.0.7 (Jun 26, 2011)
* Firefox 5.0 compatibility. * Firefox 5.0 compatibility.
* Updated translations from babelzilla.org. * Updated translations from babelzilla.org.
@ -128,3 +136,16 @@ Hit back and try another one!
* Integrate into the net error page. * Integrate into the net error page.
* Version 0.5.1 * Version 0.5.1
* Bugfix, broken shortcut key. * Bugfix, broken shortcut key.
# Contact
Mastodon: https://soshar.dess.ga/@Albirew
Twitter: https://twitter.com/Albirew
# Installation
Use either release file or install from Firefox Addons:
https://addons.mozilla.org/firefox/addon/resurrect-pages-isup-edition/
# Licence
MIT Licence (https://choosealicense.com/licenses/mit/)

Voir le fichier

@ -19,14 +19,9 @@
"description": "Resurrect this link" "description": "Resurrect this link"
}, },
"resurrectGoogle": { "resurrectCachew": {
"message": "with Google", "message": "with Cachew",
"description": "with Google" "description": "with Cache-view"
},
"resurrectGoogleText": {
"message": "with Google (text only)",
"description": "with Google (text only)"
}, },
"resurrectArchive": { "resurrectArchive": {

Voir le fichier

@ -20,8 +20,8 @@
}, },
"resurrectGoogle": { "resurrectGoogle": {
"message": "avec Google", "message": "avec Cachew",
"description": "with Google" "description": "with Cache-view"
}, },
"resurrectGoogleText": { "resurrectGoogleText": {

Voir le fichier

@ -11,8 +11,7 @@ chrome.storage.local.get('openIn', item => {
}, logLastError); }, logLastError);
for (let [name, id, icon] of [ for (let [name, id, icon] of [
['Google', 'google', 'google'], ['Cachew', 'cachew', 'cachew'],
['GoogleText', 'googletext', 'google'],
['Archive', 'archive', 'waybackmachine'], ['Archive', 'archive', 'waybackmachine'],
['ArchiveList', 'archivelist', 'waybackmachine'], ['ArchiveList', 'archivelist', 'waybackmachine'],
['ArchiveIs', 'archiveis', 'archiveis'], ['ArchiveIs', 'archiveis', 'archiveis'],
@ -62,22 +61,20 @@ chrome.contextMenus.onClicked.addListener(function(info, tab) {
} else if (id.endsWith('-link')) { } else if (id.endsWith('-link')) {
url = info.linkUrl; url = info.linkUrl;
} }
if (id.startsWith('resurrect-google-')) { if (id.startsWith('resurrect-cachew-')) {
goToUrl(genGoogleUrl(url), openIn); goToUrl(genCachewUrl(url), openIn, tab.id);
} else if (id.startsWith('resurrect-googletext-')) {
goToUrl(genGoogleTextUrl(url), openIn);
} else if (id.startsWith('resurrect-archive-')) { } else if (id.startsWith('resurrect-archive-')) {
goToUrl(genIaUrl(url), openIn); goToUrl(genIaUrl(url), openIn, tab.id);
} else if (id.startsWith('resurrect-archivelist-')) { } else if (id.startsWith('resurrect-archivelist-')) {
goToUrl(genIaListUrl(url), openIn); goToUrl(genIaListUrl(url), openIn, tab.id);
} else if (id.startsWith('resurrect-archiveis-')) { } else if (id.startsWith('resurrect-archiveis-')) {
goToUrl(genArchiveIsUrl(url), openIn); goToUrl(genArchiveIsUrl(url), openIn, tab.id);
} else if (id.startsWith('resurrect-isup-')) { } else if (id.startsWith('resurrect-isup-')) {
goToUrl(genIsUpUrl(url), openIn); goToUrl(genIsUpUrl(url), openIn, tab.id);
} else if (id.startsWith('resurrect-webcitation-')) { } else if (id.startsWith('resurrect-webcitation-')) {
goToUrl(genWebCiteUrl(url), openIn); goToUrl(genWebCiteUrl(url), openIn, tab.id);
} else if (id.startsWith('resurrect-mementoweb-')) { } else if (id.startsWith('resurrect-mementoweb-')) {
goToUrl(genMementoUrl(url), openIn); goToUrl(genMementoUrl(url), openIn, tab.id);
} else if (id.startsWith('resurrect-current-tab-')) { } else if (id.startsWith('resurrect-current-tab-')) {
setOpenIn(openInEnum.CURRENT_TAB); setOpenIn(openInEnum.CURRENT_TAB);
} else if (id.startsWith('resurrect-new-tab-')) { } else if (id.startsWith('resurrect-new-tab-')) {

Voir le fichier

@ -5,25 +5,19 @@ openInEnum = {
NEW_WINDOW : 3 NEW_WINDOW : 3
} }
let openIn = openInEnum.CURRENT_TAB; let openIn = openInEnum.CURRENT_TAB;
chrome.storage.local.get('openIn', item => { chrome.storage.local.get('openIn', item => {
if (item.openIn) { if (item.openIn) {
openIn = item.openIn; openIn = item.openIn;
} }
}); });
function logLastError() { function logLastError() {
if (chrome.runtime.lastError) { if (chrome.runtime.lastError) {
console.error('Resurrect error:', chrome.runtime.lastError); console.error('Resurrect error:', chrome.runtime.lastError);
} }
} }
function genGoogleUrl(url) { function genCachewUrl(url) {
return 'https://www.google.com/search?q=cache:' + encodeURIComponent(url); return 'https://cachedview.nl/#' +url;
}
function genGoogleTextUrl(url) {
return 'https://www.google.com/search?strip=1&q=cache:' + encodeURIComponent(url);
} }
function genIaUrl(url) { function genIaUrl(url) {
@ -37,7 +31,7 @@ function genIaListUrl(url) {
} }
function genArchiveIsUrl(url) { function genArchiveIsUrl(url) {
return 'https://archive.md/'+url; return 'https://archive.ph/'+url;
} }
function genWebCiteUrl(url) { function genWebCiteUrl(url) {
@ -77,16 +71,16 @@ function updateContextRadios() {
}); });
} }
function goToUrl(url, where) { function goToUrl(url, where, openerTabId) {
switch(Number(where)) { switch(Number(where)) {
case openInEnum.CURRENT_TAB: case openInEnum.CURRENT_TAB:
chrome.tabs.update({'url': url}); chrome.tabs.update({'url': url});
break; break;
case openInEnum.NEW_TAB: case openInEnum.NEW_TAB:
chrome.tabs.create({'url': url}); chrome.tabs.create({'url': url, openerTabId});
break; break;
case openInEnum.NEW_BGTAB: case openInEnum.NEW_BGTAB:
chrome.tabs.create({'url': url, 'active': false}); chrome.tabs.create({'url': url, 'active': false, openerTabId});
break; break;
case openInEnum.NEW_WINDOW: case openInEnum.NEW_WINDOW:
chrome.windows.create({'url': url}); chrome.windows.create({'url': url});

6
contribute.md Fichier normal
Voir le fichier

@ -0,0 +1,6 @@
# Contribute
I love pull requests from everyone.
In fact, since I don't have much time for coding (neither much skill, I must admit), any pull request is very welcome!
If you find a bug in the source code, you can help me by submitting an issue to this repository.
Even better if you can submit a Pull Request with a fix.

BIN
icons/cacheicons/cachew.png Fichier normal

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 9.4 KiB

Fichier binaire non affiché.

Avant

Largeur:  |  Hauteur:  |  Taille: 4.5 KiB

Fichier binaire non affiché.

Avant

Largeur:  |  Hauteur:  |  Taille: 7.9 KiB

Après

Largeur:  |  Hauteur:  |  Taille: 6.8 KiB

Fichier binaire non affiché.

Avant

Largeur:  |  Hauteur:  |  Taille: 2.6 KiB

Après

Largeur:  |  Hauteur:  |  Taille: 6.6 KiB

Voir le fichier

Voir le fichier

@ -3,11 +3,11 @@
"name": "__MSG_extensionName__", "name": "__MSG_extensionName__",
"short_name": "__MSG_extensionName__", "short_name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__", "description": "__MSG_extensionDescription__",
"version": "6.2", "version": "7.0.1",
"default_locale": "en", "default_locale": "en",
"homepage_url": "https://github.com/Albirew/resurrect-pages", "homepage_url": "https://github.com/Albirew/resurrect-pages",
"applications": { "browser_specific_settings": {
"gecko": { "gecko": {
"id": "resurrect-pages@albirew.fr", "id": "resurrect-pages@albirew.fr",
"strict_min_version": "57.0" "strict_min_version": "57.0"

Voir le fichier

@ -20,13 +20,16 @@ img {
vertical-align: bottom; vertical-align: bottom;
height: 16px; height: 16px;
} }
@media (prefers-color-scheme: dark){
body {
filter: hue-rotate(180deg) invert(1);
background-color:#102;
}
}
</style> </style>
<form> <form>
<button data-locale="resurrectGoogle" data-gen="genGoogleUrl"> <button data-locale="resurrectCachew" data-gen="genCachewUrl">
<img src="icons/cacheicons/google.png"> <img src="icons/cacheicons/cachew.png">
</button>
<button data-locale="resurrectGoogleText" data-gen="genGoogleTextUrl">
<img src="icons/cacheicons/google.png">
</button> </button>
<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">

Voir le fichier

@ -23,7 +23,7 @@ function resurrect(gen) {
logLastError(); logLastError();
let url = gen(tabObj[0].url); let url = gen(tabObj[0].url);
console.info('Resurrecting via URL', url); console.info('Resurrecting via URL', url);
goToUrl(url, openIn); goToUrl(url, openIn, tabObj[0].id);
window.close(); window.close();
}); });
} }