diff --git a/README.md b/README.md index 7ee5644..d67b620 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Or, the easier route, use this extension. # 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/) @@ -31,6 +31,8 @@ Hit back and try another one! # Changelog + * Version 7 + * Replaced Google with Cachew (Cache-view) * Version 6.2.1 * Specify openerTabId for opened tabs * Version 6.2 diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 3a54535..e1d68aa 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -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": { diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json index 61fa8c1..9b9a2b2 100644 --- a/_locales/fr/messages.json +++ b/_locales/fr/messages.json @@ -20,8 +20,8 @@ }, "resurrectGoogle": { - "message": "avec Google", - "description": "with Google" + "message": "avec Cachew", + "description": "with Cache-view" }, "resurrectGoogleText": { diff --git a/background.js b/background.js index 8116170..0b0971a 100644 --- a/background.js +++ b/background.js @@ -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,10 +61,8 @@ chrome.contextMenus.onClicked.addListener(function(info, tab) { } else if (id.endsWith('-link')) { url = info.linkUrl; } - if (id.startsWith('resurrect-google-')) { - goToUrl(genGoogleUrl(url), openIn, tab.id); - } else if (id.startsWith('resurrect-googletext-')) { - goToUrl(genGoogleTextUrl(url), openIn, tab.id); + if (id.startsWith('resurrect-cachew-')) { + goToUrl(genCachewUrl(url), openIn, tab.id); } else if (id.startsWith('resurrect-archive-')) { goToUrl(genIaUrl(url), openIn, tab.id); } else if (id.startsWith('resurrect-archivelist-')) { diff --git a/common.js b/common.js index 55967ce..2ef7692 100644 --- a/common.js +++ b/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) { diff --git a/icons/cacheicons/cachew.png b/icons/cacheicons/cachew.png new file mode 100644 index 0000000..3b5bdba Binary files /dev/null and b/icons/cacheicons/cachew.png differ diff --git a/icons/cacheicons/google.png b/icons/cacheicons/google.png deleted file mode 100644 index 61e5f4c..0000000 Binary files a/icons/cacheicons/google.png and /dev/null differ diff --git a/popup.htm b/popup.htm index 58a2389..a74443a 100644 --- a/popup.htm +++ b/popup.htm @@ -22,11 +22,8 @@ img { }
- -