Comparer les révisions
8 Révisions
Auteur | SHA1 | Date |
---|---|---|
Albirew | a8a76a1cba | |
Albirew | 4cd0f61d80 | |
Albirew | d2cb1d9492 | |
Albirew | 72f4983f96 | |
Albirew | 816e5d6ed8 | |
Albirew | ca7773baf7 | |
Albirew | 16d1af6868 | |
Albirew | d8566c66a4 |
|
@ -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.
|
33
README.md
33
README.md
|
@ -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.
|
||||
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?
|
||||
Call in the clerics, and perform a resurrection ceremony!
|
||||
Or, the easier route, use this extension.
|
||||
|
||||
## Features
|
||||
|
||||
# Features
|
||||
* 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/)
|
||||
* [WebCite](http://www.webcitation.org/)
|
||||
* [archive.is](https://archive.is/)
|
||||
|
@ -27,8 +28,16 @@ Hit back and try another one!
|
|||
* In the toolbar, just customize it to drag the button in.
|
||||
* With the keyboard: press `Ctrl-Shift-U`
|
||||
|
||||
|
||||
# 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
|
||||
* changed archive.is tld to archive.md
|
||||
* Version 6.1
|
||||
* Revived context menu (PR #13 from DenB10)
|
||||
* Version 6
|
||||
|
@ -67,9 +76,10 @@ Hit back and try another one!
|
|||
* Typo in some languages for Gigablast
|
||||
* Removed yahoo cache (yahoo uses bing cache now)
|
||||
* Removed coral CDN (almost alsways dead)
|
||||
* Version 2.1 (Sep 19, 2013)
|
||||
* Version 2.1 (Sep 19, 2013) FORK
|
||||
* Firefox 22+ compatibility
|
||||
* Added isup.me provider
|
||||
|
||||
* Version 2.0.7 (Jun 26, 2011)
|
||||
* Firefox 5.0 compatibility.
|
||||
* Updated translations from babelzilla.org.
|
||||
|
@ -126,3 +136,16 @@ Hit back and try another one!
|
|||
* Integrate into the net error page.
|
||||
* Version 0.5.1
|
||||
* 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/)
|
||||
|
||||
|
|
|
@ -19,14 +19,9 @@
|
|||
"description": "Resurrect this link"
|
||||
},
|
||||
|
||||
"resurrectGoogle": {
|
||||
"message": "with Google",
|
||||
"description": "with Google"
|
||||
},
|
||||
|
||||
"resurrectGoogleText": {
|
||||
"message": "with Google (text only)",
|
||||
"description": "with Google (text only)"
|
||||
"resurrectCachew": {
|
||||
"message": "with Cachew",
|
||||
"description": "with Cache-view"
|
||||
},
|
||||
|
||||
"resurrectArchive": {
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
},
|
||||
|
||||
"resurrectGoogle": {
|
||||
"message": "avec Google",
|
||||
"description": "with Google"
|
||||
"message": "avec Cachew",
|
||||
"description": "with Cache-view"
|
||||
},
|
||||
|
||||
"resurrectGoogleText": {
|
||||
|
|
|
@ -11,8 +11,7 @@ chrome.storage.local.get('openIn', item => {
|
|||
}, logLastError);
|
||||
|
||||
for (let [name, id, icon] of [
|
||||
['Google', 'google', 'google'],
|
||||
['GoogleText', 'googletext', 'google'],
|
||||
['Cachew', 'cachew', 'cachew'],
|
||||
['Archive', 'archive', 'waybackmachine'],
|
||||
['ArchiveList', 'archivelist', 'waybackmachine'],
|
||||
['ArchiveIs', 'archiveis', 'archiveis'],
|
||||
|
@ -62,22 +61,20 @@ chrome.contextMenus.onClicked.addListener(function(info, tab) {
|
|||
} else if (id.endsWith('-link')) {
|
||||
url = info.linkUrl;
|
||||
}
|
||||
if (id.startsWith('resurrect-google-')) {
|
||||
goToUrl(genGoogleUrl(url), openIn);
|
||||
} else if (id.startsWith('resurrect-googletext-')) {
|
||||
goToUrl(genGoogleTextUrl(url), openIn);
|
||||
if (id.startsWith('resurrect-cachew-')) {
|
||||
goToUrl(genCachewUrl(url), openIn, tab.id);
|
||||
} else if (id.startsWith('resurrect-archive-')) {
|
||||
goToUrl(genIaUrl(url), openIn);
|
||||
goToUrl(genIaUrl(url), openIn, tab.id);
|
||||
} else if (id.startsWith('resurrect-archivelist-')) {
|
||||
goToUrl(genIaListUrl(url), openIn);
|
||||
goToUrl(genIaListUrl(url), openIn, tab.id);
|
||||
} else if (id.startsWith('resurrect-archiveis-')) {
|
||||
goToUrl(genArchiveIsUrl(url), openIn);
|
||||
goToUrl(genArchiveIsUrl(url), openIn, tab.id);
|
||||
} else if (id.startsWith('resurrect-isup-')) {
|
||||
goToUrl(genIsUpUrl(url), openIn);
|
||||
goToUrl(genIsUpUrl(url), openIn, tab.id);
|
||||
} else if (id.startsWith('resurrect-webcitation-')) {
|
||||
goToUrl(genWebCiteUrl(url), openIn);
|
||||
goToUrl(genWebCiteUrl(url), openIn, tab.id);
|
||||
} else if (id.startsWith('resurrect-mementoweb-')) {
|
||||
goToUrl(genMementoUrl(url), openIn);
|
||||
goToUrl(genMementoUrl(url), openIn, tab.id);
|
||||
} else if (id.startsWith('resurrect-current-tab-')) {
|
||||
setOpenIn(openInEnum.CURRENT_TAB);
|
||||
} else if (id.startsWith('resurrect-new-tab-')) {
|
||||
|
|
18
common.js
18
common.js
|
@ -5,25 +5,19 @@ openInEnum = {
|
|||
NEW_WINDOW : 3
|
||||
}
|
||||
let openIn = openInEnum.CURRENT_TAB;
|
||||
|
||||
chrome.storage.local.get('openIn', item => {
|
||||
if (item.openIn) {
|
||||
openIn = item.openIn;
|
||||
}
|
||||
});
|
||||
|
||||
function logLastError() {
|
||||
if (chrome.runtime.lastError) {
|
||||
console.error('Resurrect error:', chrome.runtime.lastError);
|
||||
}
|
||||
}
|
||||
|
||||
function genGoogleUrl(url) {
|
||||
return 'https://www.google.com/search?q=cache:' + encodeURIComponent(url);
|
||||
}
|
||||
|
||||
function genGoogleTextUrl(url) {
|
||||
return 'https://www.google.com/search?strip=1&q=cache:' + encodeURIComponent(url);
|
||||
function genCachewUrl(url) {
|
||||
return 'https://cachedview.nl/#' +url;
|
||||
}
|
||||
|
||||
function genIaUrl(url) {
|
||||
|
@ -37,7 +31,7 @@ function genIaListUrl(url) {
|
|||
}
|
||||
|
||||
function genArchiveIsUrl(url) {
|
||||
return 'https://archive.is/'+url;
|
||||
return 'https://archive.ph/'+url;
|
||||
}
|
||||
|
||||
function genWebCiteUrl(url) {
|
||||
|
@ -77,16 +71,16 @@ function updateContextRadios() {
|
|||
});
|
||||
}
|
||||
|
||||
function goToUrl(url, where) {
|
||||
function goToUrl(url, where, openerTabId) {
|
||||
switch(Number(where)) {
|
||||
case openInEnum.CURRENT_TAB:
|
||||
chrome.tabs.update({'url': url});
|
||||
break;
|
||||
case openInEnum.NEW_TAB:
|
||||
chrome.tabs.create({'url': url});
|
||||
chrome.tabs.create({'url': url, openerTabId});
|
||||
break;
|
||||
case openInEnum.NEW_BGTAB:
|
||||
chrome.tabs.create({'url': url, 'active': false});
|
||||
chrome.tabs.create({'url': url, 'active': false, openerTabId});
|
||||
break;
|
||||
case openInEnum.NEW_WINDOW:
|
||||
chrome.windows.create({'url': url});
|
||||
|
|
|
@ -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.
|
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 |
|
@ -3,11 +3,11 @@
|
|||
"name": "__MSG_extensionName__",
|
||||
"short_name": "__MSG_extensionName__",
|
||||
"description": "__MSG_extensionDescription__",
|
||||
"version": "6.1",
|
||||
"version": "7.0.1",
|
||||
"default_locale": "en",
|
||||
"homepage_url": "https://github.com/Albirew/resurrect-pages",
|
||||
|
||||
"applications": {
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"id": "resurrect-pages@albirew.fr",
|
||||
"strict_min_version": "57.0"
|
||||
|
|
13
popup.htm
13
popup.htm
|
@ -20,13 +20,16 @@ img {
|
|||
vertical-align: bottom;
|
||||
height: 16px;
|
||||
}
|
||||
@media (prefers-color-scheme: dark){
|
||||
body {
|
||||
filter: hue-rotate(180deg) invert(1);
|
||||
background-color:#102;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<form>
|
||||
<button data-locale="resurrectGoogle" data-gen="genGoogleUrl">
|
||||
<img src="icons/cacheicons/google.png">
|
||||
</button>
|
||||
<button data-locale="resurrectGoogleText" data-gen="genGoogleTextUrl">
|
||||
<img src="icons/cacheicons/google.png">
|
||||
<button data-locale="resurrectCachew" data-gen="genCachewUrl">
|
||||
<img src="icons/cacheicons/cachew.png">
|
||||
</button>
|
||||
<button data-locale="resurrectArchive" data-gen="genIaUrl">
|
||||
<img src="icons/cacheicons/waybackmachine.png">
|
||||
|
|
2
popup.js
2
popup.js
|
@ -23,7 +23,7 @@ function resurrect(gen) {
|
|||
logLastError();
|
||||
let url = gen(tabObj[0].url);
|
||||
console.info('Resurrecting via URL', url);
|
||||
goToUrl(url, openIn);
|
||||
goToUrl(url, openIn, tabObj[0].id);
|
||||
window.close();
|
||||
});
|
||||
}
|
||||
|
|
Chargement…
Référencer dans un nouveau ticket