1
1
Bifurcation 0

Merge remote-tracking branch 'upstream/master'

Cette révision appartient à :
girst 2017-11-16 15:35:29 +01:00
révision cec8d43a8c
43 fichiers modifiés avec 305 ajouts et 906 suppressions

3
.gitignore externe Fichier normal
Voir le fichier

@ -0,0 +1,3 @@
*.xpi
.project
.settings

Voir le fichier

@ -1,19 +1,16 @@
# Resurrect Pages 4
## Documentation
# Documentation
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.
Or (the easier route) use this extension.
## Screenshots
![Context Menu](https://camo.githubusercontent.com/264d0c9221bd3b22a41b3848597eeedbd606a5fb/68747470733a2f2f692e696d6775722e636f6d2f48654d666f77792e706e67)
![Toolbar Menu](https://camo.githubusercontent.com/973154dcbc6c17736b9b2d4e4a4a00959465ec6d/68747470733a2f2f692e696d6775722e636f6d2f6d4c554e52414c2e706e67)
## Features
* Searches through seven page cache/mirrors:
@ -31,14 +28,15 @@ 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 4.1 (Aug 20, 2017)
* includes toolbar icon with popup, keyboard shortcut
* does not include netError page ([not possible currently](https://bugzilla.mozilla.org/show_bug.cgi?id=1376793))
* Version 4 (Aug 19, 2017)
* completely rewritten as WebExtension by [Tobias Girstmair](https://gir.st/)
* Version 5 (Aug 23, 2017)
* Don't use `innerHTML`, per Mozilla reviewer.
* Version 4 (Aug 20, 2017)
* Rewritten as WebExtension with major contributions
by [Tobias Girstmair](https://gir.st/)
* Does not include netError page
([not possible currently](http://bugzil.la/1376793))
* Not everything from the old version ported over yet
* Version 3 (Sep 9, 2015)
* Fix layout on error page w.r.t. the "report error" dialog.

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Ressuscita pàgines mortes trobant els seus fantasmes (copies)" },
"ResurrectPage": { "message": "Ressuscita aquesta pàgina" },
"ResurrectLink": { "message": "Ressuscita aquest enllaç" },
"ResurrectGoogle": { "message": "Google Cache" },
"ResurrectGoogleText": { "message": "Google Cache (només text)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "En la pestanya/finestra actual" },
"ResurrectInNewTab": { "message": "En una nova pestanya (foreground)" },
"ResurrectInNewBGTab": { "message": "En una nova pestanya (background)" },
"ResurrectInNewWindow": { "message": "En una nova finestra" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Oživuje mrtvé webové stránky vyhledáváním jejich duchů v archivech." },
"ResurrectPage": { "message": "Oživit tuto stránku" },
"ResurrectLink": { "message": "Oživit tento odkaz" },
"ResurrectGoogle": { "message": "Google" },
"ResurrectGoogleText": { "message": "Google (prostý text)" },
"ResurrectArchive": { "message": "Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "V současném panelu/okně" },
"ResurrectInNewTab": { "message": "V novém panelu (foreground)" },
"ResurrectInNewBGTab": { "message": "V novém panelu (background)" },
"ResurrectInNewWindow": { "message": "V novém okně" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Genopliv døde sider, ved at finde deres spøgelser." },
"ResurrectPage": { "message": "Genopliv denne side" },
"ResurrectLink": { "message": "Genopliv dette link" },
"ResurrectGoogle": { "message": "Google" },
"ResurrectGoogleText": { "message": "Google (kun tekst)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "I nuværende faneblad/vindue" },
"ResurrectInNewTab": { "message": "I et nyt faneblad (foreground)" },
"ResurrectInNewBGTab": { "message": "I et nyt faneblad (background)" },
"ResurrectInNewWindow": { "message": "I et nyt vindue" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Genopliv døde sider, ved at finde deres spøgelser." },
"ResurrectPage": { "message": "Genopliv denne side" },
"ResurrectLink": { "message": "Genopliv dette link" },
"ResurrectGoogle": { "message": "Google Cache" },
"ResurrectGoogleText": { "message": "Google Cache (kun tekst)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "I nuværende faneblad/vindue" },
"ResurrectInNewTab": { "message": "I et nyt faneblad (foreground)" },
"ResurrectInNewBGTab": { "message": "I et nyt faneblad (background)" },
"ResurrectInNewWindow": { "message": "I et nyt vindue" }
}

Voir le fichier

@ -1,16 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Wiederbeleben von toten Seiten, indem die Geister-Abbilder dieser Seiten gesucht werden." },
"ResurrectPage": { "message": "diese Seite wiederbeleben" },
"ResurrectLink": { "message": "diesen Verweis wiederbeleben" },
"ResurrectGoogle": { "message": "mit Google" },
"ResurrectGoogleText": { "message": "mit Google (Nur Text)" },
"ResurrectArchive": { "message": "mit dem Internet Archive" },
"ResurrectArchiveIs": { "message": "mit archive.is" },
"ResurrectWebcitation": { "message": "mit WebCite" },
"ResurrectInCurrentTab": { "message": "in aktuellem Tab/Fenster" },
"ResurrectInNewTab": { "message": "in neuem Tab (Vordergrund)" },
"ResurrectInNewBGTab": { "message": "in neuem Tab (Hintergrund)" },
"ResurrectInNewWindow": { "message": "in neuem Fenster" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Ανασύσταση «εξαφανισμένων» σελίδων." },
"ResurrectPage": { "message": "Ανασύσταση αυτής της σελίδας" },
"ResurrectLink": { "message": "Ανασύσταση αυτού του δεσμού" },
"ResurrectGoogle": { "message": "Google Cache" },
"ResurrectGoogleText": { "message": "Google Cache (μόνο κείμενο)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "Στην τρέχουσα καρτέλα/παράθυρο" },
"ResurrectInNewTab": { "message": "Σε νέα καρτέλα (foreground)" },
"ResurrectInNewBGTab": { "message": "Σε νέα καρτέλα (background)" },
"ResurrectInNewWindow": { "message": "Σε νέο παράθυρο" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Ανασύσταση «εξαφάνισμένων» σελίδων." },
"ResurrectPage": { "message": "Ανασύσταση αυτής της σελίδας" },
"ResurrectLink": { "message": "Ανασύσταση αυτού του δεσμού" },
"ResurrectGoogle": { "message": "Google Cache" },
"ResurrectGoogleText": { "message": "Google Cache (μόνο κείμενο)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "Στην τρέχουσα καρτέλα/παράθυρο" },
"ResurrectInNewTab": { "message": "Σε νέα καρτέλα (foreground)" },
"ResurrectInNewBGTab": { "message": "Σε νέα καρτέλα (background)" },
"ResurrectInNewWindow": { "message": "Σε νέο παράθυρο" }
}

Voir le fichier

@ -1,15 +1,66 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Resurrect dead pages, by finding their ghosts." },
"ResurrectPage": { "message": "Resurrect this page" },
"ResurrectLink": { "message": "Resurrect this link" },
"ResurrectGoogle": { "message": "with Google" },
"ResurrectGoogleText": { "message": "with Google (text only)" },
"ResurrectArchive": { "message": "with The Internet Archive" },
"ResurrectArchiveIs": { "message": "with archive.is" },
"ResurrectWebcitation": { "message": "with WebCite" },
"ResurrectInCurrentTab": { "message": "in the current tab/window" },
"ResurrectInNewTab": { "message": "in a new tab (foreground)" },
"ResurrectInNewBGTab": { "message": "in a new tab (background)" },
"ResurrectInNewWindow": { "message": "in a new window" }
"extensionName": {
"message": "Resurrect Pages",
"description": "Name of the extension."
},
"extensionDescription": {
"message": "Resurrect dead pages, by finding their ghosts.",
"description": "Description of the add-on."
},
"resurrect_page": {
"message": "Resurrect this page",
"description": "Resurrect this page"
},
"resurrect_link": {
"message": "Resurrect this link",
"description": "Resurrect this link"
},
"resurrectGoogle": {
"message": "with Google",
"description": "with Google"
},
"resurrectGoogleText": {
"message": "with Google (text only)",
"description": "with Google (text only)"
},
"resurrectArchive": {
"message": "with The Internet Archive",
"description": "with The Internet Archive"
},
"resurrectArchiveIs": {
"message": "with archive.is",
"description": "with archive.is"
},
"resurrectWebcitation": {
"message": "with WebCite",
"description": "with WebCite"
},
"resurrectConfigCurrentTab": {
"message": "in the current tab",
"description": "in the current tab"
},
"resurrectConfigNewTab": {
"message": "in a new tab (foreground)",
"description": "in a new tab (foreground)"
},
"resurrectConfigBgTab": {
"message": "in a new tab (background)",
"description": "in a new tab (background)"
},
"resurrectConfigNewWindow": {
"message": "in a new window",
"description": "in a new window"
}
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Resucita páginas muertas, encontrando sus restos." },
"ResurrectPage": { "message": "Resucitar esta página" },
"ResurrectLink": { "message": "Resucitar este enlace" },
"ResurrectGoogle": { "message": "Cache de Google" },
"ResurrectGoogleText": { "message": "Cache de Google (solo texto)" },
"ResurrectArchive": { "message": "El Archivo de Internet" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "En la actual ventana/pestaña" },
"ResurrectInNewTab": { "message": "En una nueva pestaña (foreground)" },
"ResurrectInNewBGTab": { "message": "En una nueva pestaña (background)" },
"ResurrectInNewWindow": { "message": "En una nueva ventana" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Resucita páginas muertas, encontrando sus restos." },
"ResurrectPage": { "message": "Resucitar esta página" },
"ResurrectLink": { "message": "Resucitar este enlace" },
"ResurrectGoogle": { "message": "Cache de Google" },
"ResurrectGoogleText": { "message": "Cache de Google (solo texto)" },
"ResurrectArchive": { "message": "El Archivo de Internet" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "En la actual ventana/pestaña" },
"ResurrectInNewTab": { "message": "En una nueva pestaña (foreground)" },
"ResurrectInNewBGTab": { "message": "En una nueva pestaña (background)" },
"ResurrectInNewWindow": { "message": "En una nueva ventana" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Resucita páginas que ya no existen, buscando en las cachés." },
"ResurrectPage": { "message": "Resucitar esta página" },
"ResurrectLink": { "message": "Resucitar este enlace" },
"ResurrectGoogle": { "message": "Caché de Google" },
"ResurrectGoogleText": { "message": "Caché de Google (sólo texto)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "En la pestaña/ventana actual" },
"ResurrectInNewTab": { "message": "En una nueva pestaña (foreground)" },
"ResurrectInNewBGTab": { "message": "En una nueva pestaña (background)" },
"ResurrectInNewWindow": { "message": "En una nueva ventana" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Herätä kuolleet sivut henkiin haamujen avulla." },
"ResurrectPage": { "message": "Palauta tämä sivu" },
"ResurrectLink": { "message": "Palauta tämän linkin kohde" },
"ResurrectGoogle": { "message": "Google välimuisti" },
"ResurrectGoogleText": { "message": "Google välimuisti (vain teksti)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "Nykyiseen välilehteen/ikkunaan" },
"ResurrectInNewTab": { "message": "Uuteen välilehteen (foreground)" },
"ResurrectInNewBGTab": { "message": "Uuteen välilehteen (background)" },
"ResurrectInNewWindow": { "message": "Uuteen ikkunaan" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Herätä kuolleet sivut henkiin haamujen avulla." },
"ResurrectPage": { "message": "Palauta tämä sivu" },
"ResurrectLink": { "message": "Palauta tämän linkin kohde" },
"ResurrectGoogle": { "message": "Google välimuisti" },
"ResurrectGoogleText": { "message": "Google välimuisti (vain teksti)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "Nykyiseen välilehteen/ikkunaan" },
"ResurrectInNewTab": { "message": "Uuteen välilehteen (foreground)" },
"ResurrectInNewBGTab": { "message": "Uuteen välilehteen (background)" },
"ResurrectInNewWindow": { "message": "Uuteen ikkunaan" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Ressuscite les pages mortes en récupérant leur fantôme dans les caches." },
"ResurrectPage": { "message": "Ressusciter cette page" },
"ResurrectLink": { "message": "Ressusciter ce lien" },
"ResurrectGoogle": { "message": "Cache Google" },
"ResurrectGoogleText": { "message": "Cache Google (texte seulement)" },
"ResurrectArchive": { "message": "Archive internet" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "dans l'onglet/la fenêtre courant(e)" },
"ResurrectInNewTab": { "message": "dans un nouvel onglet (foreground)" },
"ResurrectInNewBGTab": { "message": "dans un nouvel onglet (background)" },
"ResurrectInNewWindow": { "message": "dans une nouvelle fenêtre" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Ressuscite les pages mortes en récupérant leur fantôme dans les caches." },
"ResurrectPage": { "message": "Ressusciter cette page" },
"ResurrectLink": { "message": "Ressusciter ce lien" },
"ResurrectGoogle": { "message": "Cache Google" },
"ResurrectGoogleText": { "message": "Cache Google (texte seulement)" },
"ResurrectArchive": { "message": "Archive internet" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "dans l'onglet/la fenêtre courant(e)" },
"ResurrectInNewTab": { "message": "dans un nouvel onglet (foreground)" },
"ResurrectInNewBGTab": { "message": "dans un nouvel onglet (background)" },
"ResurrectInNewWindow": { "message": "dans une nouvelle fenêtre" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Uskrsava mrtve stranice pronalazeći njihove duhove." },
"ResurrectPage": { "message": "Uskrsni ovu stranicu" },
"ResurrectLink": { "message": "Uskrsni ovu poveznicu" },
"ResurrectGoogle": { "message": "Google privremeni spremnik" },
"ResurrectGoogleText": { "message": "Google privremeni spremnik (samo tekst)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "U trenutnoj kartici/prozoru" },
"ResurrectInNewTab": { "message": "U novoj kartici (foreground)" },
"ResurrectInNewBGTab": { "message": "U novoj kartici (background)" },
"ResurrectInNewWindow": { "message": "U novom prozoru" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Permette di riattivare link/pagine web non più accessibili trovando corrispondenti pagine fantasma" },
"ResurrectPage": { "message": "Riattiva pagina web con Resurrect Pages…" },
"ResurrectLink": { "message": "Riattiva link con Resurrect Pages…" },
"ResurrectGoogle": { "message": "Google Cache" },
"ResurrectGoogleText": { "message": "Google Cache (solo testo)" },
"ResurrectArchive": { "message": "The Internet Archive " },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "Riattiva nella scheda/finestra attuale" },
"ResurrectInNewTab": { "message": "Riattiva in una nuova scheda (foreground)" },
"ResurrectInNewBGTab": { "message": "Riattiva in una nuova scheda (background)" },
"ResurrectInNewWindow": { "message": "Riattiva in una nuova finestra" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Permette di resuscitare pagine non più accessibili trovando corrispondenti pagine fantasma" },
"ResurrectPage": { "message": "Resuscita questa pagina" },
"ResurrectLink": { "message": "Resuscita questo link" },
"ResurrectGoogle": { "message": "Google Cache" },
"ResurrectGoogleText": { "message": "Google Cache (solo testo)" },
"ResurrectArchive": { "message": "Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "nella scheda/finestra attuale" },
"ResurrectInNewTab": { "message": "in una nuova scheda (foreground)" },
"ResurrectInNewBGTab": { "message": "in una nuova scheda (background)" },
"ResurrectInNewWindow": { "message": "in una nuova finestra" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "死んだページを亡霊から生き返らせる。" },
"ResurrectPage": { "message": "このページを蘇生" },
"ResurrectLink": { "message": "このリンクを蘇生" },
"ResurrectGoogle": { "message": "Google" },
"ResurrectGoogleText": { "message": "Google (テキストのみ)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "現在のタブ・ウィンドウ" },
"ResurrectInNewTab": { "message": "新しいタブ (foreground)" },
"ResurrectInNewBGTab": { "message": "新しいタブ (background)" },
"ResurrectInNewWindow": { "message": "新しいウィンドウ" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "죽은 페이지의 영혼을 찾아내서 부활시킵니다." },
"ResurrectPage": { "message": "이 페이지를 부활" },
"ResurrectLink": { "message": "이 링크를 부활" },
"ResurrectGoogle": { "message": "Google 캐쉬" },
"ResurrectGoogleText": { "message": "Google 캐쉬 (본문 만)" },
"ResurrectArchive": { "message": "인터넷 아카이브" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "현재 탭/창으로" },
"ResurrectInNewTab": { "message": "새 탭으로 (foreground)" },
"ResurrectInNewBGTab": { "message": "새 탭으로 (background)" },
"ResurrectInNewWindow": { "message": "새 창으로" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Wek dode pagina’s weer tot leven door hun geesten te vinden." },
"ResurrectPage": { "message": "Deze pagina tot leven wekken…" },
"ResurrectLink": { "message": "Deze koppeling tot leven wekken…" },
"ResurrectGoogle": { "message": "Google" },
"ResurrectGoogleText": { "message": "Google (alleen tekst)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "In het huidige tabblad/het huidige venster" },
"ResurrectInNewTab": { "message": "In een nieuw tabblad (foreground)" },
"ResurrectInNewBGTab": { "message": "In een nieuw tabblad (background)" },
"ResurrectInNewWindow": { "message": "In een nieuw venster" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Wek dode pagina's weer tot leven door hun geesten te vinden." },
"ResurrectPage": { "message": "Deze pagina tot leven wekken" },
"ResurrectLink": { "message": "Deze koppeling tot leven wekken" },
"ResurrectGoogle": { "message": "Google" },
"ResurrectGoogleText": { "message": "Google (alleen tekst)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "In het huidige tabblad/het huidige venster" },
"ResurrectInNewTab": { "message": "In een nieuw tabblad (foreground)" },
"ResurrectInNewBGTab": { "message": "In een nieuw tabblad (background)" },
"ResurrectInNewWindow": { "message": "In een nieuw venster" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Odtwarzaj wygasłe strony odszukując ich cienie." },
"ResurrectPage": { "message": "Odtwórz tę stronę" },
"ResurrectLink": { "message": "Odtwórz ten link" },
"ResurrectGoogle": { "message": "Google Cache" },
"ResurrectGoogleText": { "message": "Google Cache (tylko tekst)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "W aktywnej karcie/oknie" },
"ResurrectInNewTab": { "message": "W nowej karcie (foreground)" },
"ResurrectInNewBGTab": { "message": "W nowej karcie (background)" },
"ResurrectInNewWindow": { "message": "W nowym oknie" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Odtwarzaj wygasłe strony odszukując ich cienie." },
"ResurrectPage": { "message": "Odtwórz tę stronę" },
"ResurrectLink": { "message": "Odtwórz ten link" },
"ResurrectGoogle": { "message": "Google Cache" },
"ResurrectGoogleText": { "message": "Google Cache (tylko tekst)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "W aktywnej karcie/oknie" },
"ResurrectInNewTab": { "message": "W nowej karcie (foreground)" },
"ResurrectInNewBGTab": { "message": "W nowej karcie (background)" },
"ResurrectInNewWindow": { "message": "W nowym oknie" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Ressuscita páginas mortas, encontrando seus fantasmas." },
"ResurrectPage": { "message": "Ressuscitar esta página" },
"ResurrectLink": { "message": "Ressuscitar este link" },
"ResurrectGoogle": { "message": "Cache do Google" },
"ResurrectGoogleText": { "message": "Cache do Google (somente texto)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "Na aba/janela atual" },
"ResurrectInNewTab": { "message": "Em uma nova aba (foreground)" },
"ResurrectInNewBGTab": { "message": "Em uma nova aba (background)" },
"ResurrectInNewWindow": { "message": "Em uma nova janela" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Ressuscita páginas mortas, ao encontrar os seus fantasmas." },
"ResurrectPage": { "message": "Ressuscitar esta página" },
"ResurrectLink": { "message": "Ressuscitar este endereço" },
"ResurrectGoogle": { "message": "Cache do Google" },
"ResurrectGoogleText": { "message": "Cache do Google (só texto)" },
"ResurrectArchive": { "message": "Arquivo de internet" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "Na aba/janela actual" },
"ResurrectInNewTab": { "message": "Numa nova aba (foreground)" },
"ResurrectInNewBGTab": { "message": "Numa nova aba (background)" },
"ResurrectInNewWindow": { "message": "Numa nova janela" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Воскрешает мертвые страницы, находя их в кэше." },
"ResurrectPage": { "message": "Воскресить эту страницу" },
"ResurrectLink": { "message": "Воскресить эту ссылку" },
"ResurrectGoogle": { "message": "Google" },
"ResurrectGoogleText": { "message": "Google (только текст)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "В текущей вкладке/окне" },
"ResurrectInNewTab": { "message": "В новой вкладке (foreground)" },
"ResurrectInNewBGTab": { "message": "В новой вкладке (background)" },
"ResurrectInNewWindow": { "message": "В новом окне" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Oživi nedosegljive strani, prikaži njihove posnetke." },
"ResurrectPage": { "message": "Oživi to stran" },
"ResurrectLink": { "message": "Oživi to povezavo" },
"ResurrectGoogle": { "message": "Google posnetek" },
"ResurrectGoogleText": { "message": "Google posnetek (samo besedilo)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "V obstoječem zavihku/oknu" },
"ResurrectInNewTab": { "message": "V novem zavihku (foreground)" },
"ResurrectInNewBGTab": { "message": "V novem zavihku (background)" },
"ResurrectInNewWindow": { "message": "V novem oknu" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Оживите избрисане странице проналажењем њихових старих копија." },
"ResurrectPage": { "message": "Оживи ову страницу…" },
"ResurrectLink": { "message": "Оживи ову везу…" },
"ResurrectGoogle": { "message": "Google" },
"ResurrectGoogleText": { "message": "Google (само текст)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "у тренутном језичку/прозору" },
"ResurrectInNewTab": { "message": "у новом језичку (foreground)" },
"ResurrectInNewBGTab": { "message": "у новом језичку (background)" },
"ResurrectInNewWindow": { "message": "у новом прозору" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Få webbsidor att återuppstå från de döda genom att hitta deras spöken." },
"ResurrectPage": { "message": "Återuppväck den här webbsidan" },
"ResurrectLink": { "message": "Återuppväck den här länken" },
"ResurrectGoogle": { "message": "Google" },
"ResurrectGoogleText": { "message": "Google (endast text)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "Nuvarande flik/fönster" },
"ResurrectInNewTab": { "message": "En ny flik (foreground)" },
"ResurrectInNewBGTab": { "message": "En ny flik (background)" },
"ResurrectInNewWindow": { "message": "Ett nytt fönster" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Ölü sayfaları diriltin, hayaletlerini bularak." },
"ResurrectPage": { "message": "Bu sayfayı dirilt" },
"ResurrectLink": { "message": "Bu linki dirilt" },
"ResurrectGoogle": { "message": "Google" },
"ResurrectGoogleText": { "message": "Google (salt metin)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "Seçili sekmede/pencerede" },
"ResurrectInNewTab": { "message": "Yeni sekmede (foreground)" },
"ResurrectInNewBGTab": { "message": "Yeni sekmede (background)" },
"ResurrectInNewWindow": { "message": "Yeni pencerede" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Ölü sayfaları diriltin, hayaletlerini bularak." },
"ResurrectPage": { "message": "Bu sayfayı dirilt" },
"ResurrectLink": { "message": "Bu linki dirilt" },
"ResurrectGoogle": { "message": "Google" },
"ResurrectGoogleText": { "message": "Google (salt metin)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "Seçili sekmede/pencerede" },
"ResurrectInNewTab": { "message": "Yeni sekmede (foreground)" },
"ResurrectInNewBGTab": { "message": "Yeni sekmede (background)" },
"ResurrectInNewWindow": { "message": "Yeni pencerede" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "Resurrect dead pages, by finding their ghosts." },
"ResurrectPage": { "message": "Resurrect this page" },
"ResurrectLink": { "message": "Resurrect this link" },
"ResurrectGoogle": { "message": "Google Cache" },
"ResurrectGoogleText": { "message": "Google Cache (text only)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "In the current tab/window" },
"ResurrectInNewTab": { "message": "In a new tab (foreground)" },
"ResurrectInNewBGTab": { "message": "In a new tab (background)" },
"ResurrectInNewWindow": { "message": "In a new window" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "通过寻找页库存档来还原失效的页面。" },
"ResurrectPage": { "message": "修复此页面" },
"ResurrectLink": { "message": "修复此链接" },
"ResurrectGoogle": { "message": "Google" },
"ResurrectGoogleText": { "message": "Google (纯文字版)" },
"ResurrectArchive": { "message": "The Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "在当前标签页或窗口" },
"ResurrectInNewTab": { "message": "在新标签页 (foreground)" },
"ResurrectInNewBGTab": { "message": "在新标签页 (background)" },
"ResurrectInNewWindow": { "message": "在新窗口" }
}

Voir le fichier

@ -1,15 +0,0 @@
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "藉由尋找頁庫存檔來還原失效的頁面。" },
"ResurrectPage": { "message": "恢復頁面" },
"ResurrectLink": { "message": "恢復此連結" },
"ResurrectGoogle": { "message": "Google" },
"ResurrectGoogleText": { "message": "Google (限文字)" },
"ResurrectArchive": { "message": "Internet Archive" },
"ResurrectArchiveIs": { "message": "archive.is" },
"ResurrectWebcitation": { "message": "WebCite" },
"ResurrectInCurrentTab": { "message": "目前分頁/視窗" },
"ResurrectInNewTab": { "message": "新分頁 (foreground)" },
"ResurrectInNewBGTab": { "message": "新分頁 (background)" },
"ResurrectInNewWindow": { "message": "新視窗" }
}

Voir le fichier

@ -1,49 +0,0 @@
#!/usr/bin/perl
=pod
usage:
* cd into old locale folder
* execute `for I in *; do ./zzz_genlocale.pl $I; done;rm -r _locales/zzz_genlocale.pl`
=cut
use warnings;
use strict;
chomp(my $extension_desc = `cat $ARGV[0]/overlay.properties|cut -d= -f2`);
chomp(my $resurrect_this_page = `grep resurrect.thispage $ARGV[0]/overlay.dtd |sed -e 's/^[^"]*"//' -e 's/">\\s*\$//'`);$resurrect_this_page=~s/\.\.\.//;
chomp(my $resurrect_this_link = `grep resurrect.thislink $ARGV[0]/overlay.dtd |sed -e 's/^[^"]*"//' -e 's/">\\s*\$//'`);$resurrect_this_link=~s/\.\.\.//;
chomp(my $google = `grep resurrect.google $ARGV[0]/overlay.dtd |sed -e 's/^[^"]*"//' -e 's/">\\s*\$//'`);
chomp(my $textonly = `grep resurrect.textonly $ARGV[0]/overlay.dtd |sed -e 's/^[^"]*"//' -e 's/">\\s*\$//'`);
chomp(my $archive = `grep "resurrect.archive " $ARGV[0]/overlay.dtd |sed -e 's/^[^"]*"//' -e 's/">\\s*\$//'`);
chomp(my $archiveis = `grep resurrect.archiveis $ARGV[0]/overlay.dtd |sed -e 's/^[^"]*"//' -e 's/">\\s*\$//'`);
chomp(my $webcit = `grep resurrect.webcitation $ARGV[0]/overlay.dtd |sed -e 's/^[^"]*"//' -e 's/">\\s*\$//'`);
chomp(my $curtab = `grep resurrect.inCurrTab $ARGV[0]/overlay.dtd |sed -e 's/^[^"]*"//' -e 's/">\\s*\$//'`);
chomp(my $newtab = `grep resurrect.inNewTab $ARGV[0]/overlay.dtd |sed -e 's/^[^"]*"//' -e 's/">\\s*\$//'`);
chomp(my $newwin = `grep resurrect.inNewWin $ARGV[0]/overlay.dtd |sed -e 's/^[^"]*"//' -e 's/">\\s*\$//'`);
my $locale = $ARGV[0];
$locale =~ s/-/_/g;
`mkdir -p _locales/$locale`;
open (my $file, '>', "_locales/$locale/messages.json");
print $file <<"EOF";
{
"extensionName": { "message": "Resurrect Pages" },
"extensionDescription": { "message": "$extension_desc" },
"ResurrectPage": { "message": "$resurrect_this_page" },
"ResurrectLink": { "message": "$resurrect_this_link" },
"ResurrectGoogle": { "message": "$google" },
"ResurrectGoogleText": { "message": "$google $textonly" },
"ResurrectArchive": { "message": "$archive" },
"ResurrectArchiveIs": { "message": "$archiveis" },
"ResurrectWebcitation": { "message": "$webcit" },
"ResurrectInCurrentTab": { "message": "$curtab" },
"ResurrectInNewTab": { "message": "$newtab (foreground)" },
"ResurrectInNewBGTab": { "message": "$newtab (background)" },
"ResurrectInNewWindow": { "message": "$newwin" }
}
EOF
close $file;

Voir le fichier

@ -1,218 +1,91 @@
var openIn = openInEnum.CURRENT_TAB;
browser.storage.local.get ("openIn").then (function (item) {
if (item.openIn) {openIn = item.openIn}
/*
Create all the context menu items.
*/
// top level {{{
browser.contextMenus.create({
id: "ResurrectPage",
title: browser.i18n.getMessage("ResurrectPage"),
contexts: ["page"]
}, onCreated);
browser.contextMenus.create({
id: "ResurrectLink",
title: browser.i18n.getMessage("ResurrectLink"),
contexts: ["link"]
}, onCreated);
//}}}
// resurrect page {{{
browser.contextMenus.create({
id: "ResurrectPageGoogle",
title: browser.i18n.getMessage("ResurrectGoogle"),
icons: { 16: "icons/cacheicons/google.png" },
parentId: "ResurrectPage"
}, onCreated);
browser.contextMenus.create({
id: "ResurrectPageGoogleText",
title: browser.i18n.getMessage("ResurrectGoogleText"),
icons: { 16: "icons/cacheicons/google.png" },
parentId: "ResurrectPage"
}, onCreated);
browser.contextMenus.create({
id: "ResurrectPageArchive",
title: browser.i18n.getMessage("ResurrectArchive"),
icons: { 16: "icons/cacheicons/waybackmachine.png" },
parentId: "ResurrectPage"
}, onCreated);
browser.contextMenus.create({
id: "ResurrectPageArchiveIs",
title: browser.i18n.getMessage("ResurrectArchiveIs"),
icons: { 16: "icons/cacheicons/archiveis.png" },
parentId: "ResurrectPage"
}, onCreated);
browser.contextMenus.create({
id: "ResurrectPageWebcitation",
title: browser.i18n.getMessage("ResurrectWebcitation"),
icons: { 16: "icons/cacheicons/webcitation.png" },
parentId: "ResurrectPage"
}, onCreated);
//}}}
// resurrect link {{{
browser.contextMenus.create({
id: "ResurrectLinkGoogle",
title: browser.i18n.getMessage("ResurrectGoogle"),
icons: { 16: "icons/cacheicons/google.png" },
parentId: "ResurrectLink"
}, onCreated);
browser.contextMenus.create({
id: "ResurrectLinkGoogleText",
title: browser.i18n.getMessage("ResurrectGoogleText"),
icons: { 16: "icons/cacheicons/google.png" },
parentId: "ResurrectLink"
}, onCreated);
browser.contextMenus.create({
id: "ResurrectLinkArchive",
title: browser.i18n.getMessage("ResurrectArchive"),
icons: { 16: "icons/cacheicons/waybackmachine.png" },
parentId: "ResurrectLink"
}, onCreated);
browser.contextMenus.create({
id: "ResurrectLinkArchiveIs",
title: browser.i18n.getMessage("ResurrectArchiveIs"),
icons: { 16: "icons/cacheicons/archiveis.png" },
parentId: "ResurrectLink"
}, onCreated);
browser.contextMenus.create({
id: "ResurrectLinkWebcitation",
title: browser.i18n.getMessage("ResurrectWebcitation"),
icons: { 16: "icons/cacheicons/webcitation.png" },
parentId: "ResurrectLink"
}, onCreated);
//}}}
//config page {{{
browser.contextMenus.create({
id: "separator-1",
type: "separator",
parentId: "ResurrectPage"
}, onCreated);
browser.contextMenus.create({
id: "ResurrectPageInCurrentTab",
type: "radio",
title: browser.i18n.getMessage("ResurrectInCurrentTab"),
checked: openIn==openInEnum.CURRENT_TAB,
parentId: "ResurrectPage"
}, onCreated);
browser.contextMenus.create({
id: "ResurrectPageInNewTab",
type: "radio",
title: browser.i18n.getMessage("ResurrectInNewTab"),
checked: openIn==openInEnum.NEW_TAB,
parentId: "ResurrectPage"
}, onCreated);
browser.contextMenus.create({
id: "ResurrectPageInNewBGTab",
type: "radio",
title: browser.i18n.getMessage("ResurrectInNewBGTab"),
checked: openIn==openInEnum.NEW_BGTAB,
parentId: "ResurrectPage"
}, onCreated);
browser.contextMenus.create({
id: "ResurrectPageInNewWindow",
type: "radio",
title: browser.i18n.getMessage("ResurrectInNewWindow"),
checked: openIn==openInEnum.NEW_WINDOW,
parentId: "ResurrectPage"
}, onCreated);
//}}}
//config link {{{
browser.contextMenus.create({
id: "separator-2",
type: "separator",
parentId: "ResurrectLink"
}, onCreated);
browser.contextMenus.create({
id: "ResurrectLinkInCurrentTab",
type: "radio",
title: browser.i18n.getMessage("ResurrectInCurrentTab"),
checked: openIn==openInEnum.CURRENT_TAB,
parentId: "ResurrectLink"
}, onCreated);
browser.contextMenus.create({
id: "ResurrectLinkInNewTab",
type: "radio",
title: browser.i18n.getMessage("ResurrectInNewTab"),
checked: openIn==openInEnum.NEW_TAB,
parentId: "ResurrectLink"
}, onCreated);
browser.contextMenus.create({
id: "ResurrectLinkInNewBGTab",
type: "radio",
title: browser.i18n.getMessage("ResurrectInNewBGTab"),
checked: openIn==openInEnum.NEW_BGTAB,
parentId: "ResurrectLink"
}, onCreated);
browser.contextMenus.create({
id: "ResurrectLinkInNewWindow",
type: "radio",
title: browser.i18n.getMessage("ResurrectInNewWindow"),
checked: openIn==openInEnum.NEW_WINDOW,
parentId: "ResurrectLink"
}, onCreated);
//}}}
}, onError);
function onCreated(n) {
if (browser.runtime.lastError) {
console.log('Error: '+browser.runtime.lastError);
}
}
browser.contextMenus.onClicked.addListener(function(info, tab) {
switch (info.menuItemId) {
case "ResurrectPageGoogle": goToURL (genGoogleURL(info.pageUrl), openIn); break;
case "ResurrectLinkGoogle": goToURL (genGoogleURL(info.linkUrl), openIn); break;
case "ResurrectPageGoogleText": goToURL (genGoogleTextURL(info.pageUrl), openIn); break;
case "ResurrectLinkGoogleText": goToURL (genGoogleTextURL(info.linkUrl), openIn); break;
chrome.storage.local.get('openIn', item => {
if (item.openIn) {
openIn = item.openIn;
}
case "ResurrectPageArchive": goToURL (genArchiveURL(info.pageUrl), openIn); break;
case "ResurrectLinkArchive": goToURL (genArchiveURL(info.linkUrl), openIn); break;
function addResurrectItem(context, i18n, id, icon) {
chrome.contextMenus.create({
id: 'resurrect-' + id + '-' + context,
title: chrome.i18n.getMessage('resurrect' + i18n),
icons: {16: 'icons/cacheicons/' + icon + '.png'},
contexts: [context],
parentId: 'resurrect-' + context
}, onCreated);
}
case "ResurrectPageArchiveIs": goToURL (genArchiveIsURL(info.pageUrl), openIn); break;
case "ResurrectLinkArchiveIs": goToURL (genArchiveIsURL(info.linkUrl), openIn); break;
function addConfigItem(context, i18n, where, checked) {
chrome.contextMenus.create({
id: 'resurrect-' + where + '-' + context,
type: 'radio',
title: chrome.i18n.getMessage('resurrectConfig' + i18n),
contexts: [context],
checked: checked,
parentId: 'resurrect-' + context
}, onCreated);
}
case "ResurrectPageWebcitation": goToURL (genWebcitationURL(info.pageUrl), openIn); break;
case "ResurrectLinkWebcitation": goToURL (genWebcitationURL(info.linkUrl), openIn); break;
['page', 'link'].forEach(context => {
chrome.contextMenus.create({
id: 'resurrect-' + context,
title: chrome.i18n.getMessage('resurrect_' + context),
contexts: [context]
}, onCreated);
case "ResurrectPageInCurrentTab":
case "ResurrectLinkInCurrentTab":
setOpenIn (openInEnum.CURRENT_TAB);
return;
case "ResurrectPageInNewTab":
case "ResurrectLinkInNewTab":
setOpenIn (openInEnum.NEW_TAB);
return;
case "ResurrectPageInNewBGTab":
case "ResurrectLinkInNewBGTab":
setOpenIn (openInEnum.NEW_BGTAB);
return;
case "ResurrectPageInNewWindow":
case "ResurrectLinkInNewWindow":
setOpenIn (openInEnum.NEW_WINDOW);
return;
addResurrectItem(context, 'Google', 'google', 'google');
addResurrectItem(context, 'GoogleText', 'google-text', 'google');
addResurrectItem(context, 'Archive', 'archive', 'waybackmachine');
addResurrectItem(context, 'ArchiveIs', 'archiveis', 'archiveis');
addResurrectItem(context, 'Webcitation', 'webcitation', 'webcitation');
chrome.contextMenus.create({
id: 'resurrect-separator-config-' + context,
type: 'separator',
contexts: [context],
parentId: 'resurrect-' + context
}, onCreated);
addConfigItem(
context, 'CurrentTab', 'current-tab', openIn == openInEnum.CURRENT_TAB);
addConfigItem(
context, 'NewTab', 'new-tab', openIn == openInEnum.NEW_TAB);
addConfigItem(
context, 'BgTab', 'bg-tab', openIn == openInEnum.BG_TAB);
addConfigItem(
context, 'NewWindow', 'new-window', openIn == openInEnum.NEW_WINDOW);
});
});
chrome.contextMenus.onClicked.addListener(function(info, tab) {
let id = info.menuItemId;
let url = null;
if (id.endsWith('-page')) {
url = info.pageUrl;
} 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);
} else if (id.startsWith('resurrect-archive-')) {
goToUrl(genIaUrl(url), openIn);
} else if (id.startsWith('resurrect-archiveis-')) {
goToUrl(genArchiveIsUrl(url), openIn);
} else if (id.startsWith('resurrect-webcitation-')) {
goToUrl(genWebCiteUrl(url), openIn);
} else if (id.startsWith('resurrect-current-tab-')) {
setOpenIn(openInEnum.CURRENT_TAB);
} else if (id.startsWith('resurrect-new-tab-')) {
setOpenIn(openInEnum.NEW_TAB);
} else if (id.startsWith('resurrect-bg-tab-')) {
setOpenIn(openInEnum.NEW_BGTAB);
} else if (id.startsWith('resurrect-new-window-')) {
setOpenIn(openInEnum.NEW_WINDOW);
}
});

Voir le fichier

@ -4,66 +4,83 @@ openInEnum = {
NEW_BGTAB : 2,
NEW_WINDOW : 3
}
let openIn = openInEnum.CURRENT_TAB;
chrome.storage.local.get('openIn', item => {
if (item.openIn) {
openIn = item.openIn;
}
});
var openIn = openInEnum.CURRENT_TAB;
browser.storage.local.get ("openIn").then (function (item) { if (item.openIn) {openIn = item.openIn} }, onError);
function onError(error) {
console.log('Error: '+error);
if (chrome.runtime.lastError) {
console.error('Resurrect error: ', chrome.runtime.lastError);
}
}
function genGoogleURL (url) {
function genGoogleUrl(url) {
return 'https://www.google.com/search?q=cache:'+encodeURIComponent(url);
}
function genGoogleTextURL (url) {
function genGoogleTextUrl(url) {
return 'https://www.google.com/search?strip=1&q=cache:'+encodeURIComponent(url);
}
function genArchiveURL (url) {
var dateStr = (new Date()).toISOString().replace(/-|T|:|\..*/g, '');
function genIaUrl(url) {
let dateStr =(new Date()).toISOString().replace(/-|T|:|\..*/g, '');
return 'https://web.archive.org/web/'+dateStr+'/'+url;
}
function genArchiveIsURL (url) {
function genArchiveIsUrl(url) {
return 'https://archive.is/'+url;
}
function genWebcitationURL (url) {
function genWebCiteUrl(url) {
return 'http://webcitation.org/query.php?url='+encodeURIComponent(url);
}
function setOpenIn (where) {
function setOpenIn(where) {
openIn = where;
browser.storage.local.set({openIn: openIn}).then(null, onError);
update_context_radios();
chrome.storage.local.set({openIn: openIn}, onError);
updateContextRadios();
}
function update_context_radios() {
browser.contextMenus.update ("ResurrectPageInCurrentTab", {checked: openIn==openInEnum.CURRENT_TAB});
browser.contextMenus.update ("ResurrectPageInNewTab" , {checked: openIn==openInEnum.NEW_TAB});
browser.contextMenus.update ("ResurrectPageInNewBGTab" , {checked: openIn==openInEnum.NEW_BGTAB});
browser.contextMenus.update ("ResurrectPageInNewWindow" , {checked: openIn==openInEnum.NEW_WINDOW});
browser.contextMenus.update ("ResurrectLinkInCurrentTab", {checked: openIn==openInEnum.CURRENT_TAB});
browser.contextMenus.update ("ResurrectLinkInNewTab" , {checked: openIn==openInEnum.NEW_TAB});
browser.contextMenus.update ("ResurrectLinkInNewBGTab" , {checked: openIn==openInEnum.NEW_BGTAB});
browser.contextMenus.update ("ResurrectLinkInNewWindow" , {checked: openIn==openInEnum.NEW_WINDOW});
function updateContextRadios() {
['page', 'link'].forEach(context => {
chrome.contextMenus.update(
'resurrect-current-tab-' + context,
{checked: openIn == openInEnum.CURRENT_TAB});
chrome.contextMenus.update(
'resurrect-new-tab-' + context,
{checked: openIn == openInEnum.NEW_TAB});
chrome.contextMenus.update(
'resurrect-bg-tab-' + context,
{checked: openIn == openInEnum.NEW_BGTAB});
chrome.contextMenus.update(
'resurrect-new-window-' + context,
{checked: openIn == openInEnum.NEW_WINDOW});
});
}
function goToURL (url, where) {
switch (Number(where)) {
function goToUrl(url, where) {
switch(Number(where)) {
case openInEnum.CURRENT_TAB:
browser.tabs.update({ "url": url});
chrome.tabs.update({'url': url});
break;
case openInEnum.NEW_TAB:
browser.tabs.create({ "url": url});
chrome.tabs.create({'url': url});
break;
case openInEnum.NEW_BGTAB:
browser.tabs.create({ "url": url, "active":false});
chrome.tabs.create({'url': url, 'active': false});
break;
case openInEnum.NEW_WINDOW:
browser.windows.create({ "url": url});
chrome.windows.create({'url': url});
break;
}
}

Voir le fichier

@ -1,19 +1,24 @@
{
"manifest_version": 2,
"name": "__MSG_extensionName__",
"short_name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "4.1",
"version": "5",
"default_locale": "en",
"homepage_url": "https://github.com/arantius/resurrect-pages",
"applications": {
"gecko": {
"id":"resurrect-pages@gir.st",
"strict_min_version": "56.0b3"
"id": "{0c8fbd76-bdeb-4c52-9b24-d587ce7b9dc3}",
"strict_min_version": "57.0"
}
},
"background": {
"scripts": ["common.js","background.js"]
"scripts": [
"common.js",
"background.js"
]
},
"browser_action": {
@ -21,6 +26,7 @@
"default_title": "__MSG_extensionName__",
"default_popup": "popup.htm"
},
"commands": {
"_execute_browser_action": {
"suggested_key": {
@ -29,16 +35,15 @@
}
},
"icons": {
"16": "icons/page-16.png",
"32": "icons/page-32.png"
},
"permissions": [
"storage",
"contextMenus",
"tabs",
"activeTab"
],
"icons": {
"16": "icons/page-16.png",
"32": "icons/page-32.png"
}
]
}

Voir le fichier

@ -2,28 +2,55 @@
<meta charset="utf-8">
<style>
body {
font-family: sans-serif;
font-size: small;
font-family: caption, sans-serif;
}
button, label {
display: block;
width: 100%;
}
button {
width: 100%;
text-align:left;
margin: 2px 0;
padding: 2px;
text-align: left;
}
label {
font-size: small;
}
img {
vertical-align:bottom;
vertical-align: bottom;
}
</style>
<form>
<button id="resurrectWithGoogle" ><img src="icons/cacheicons/google.png"> <span id="labelGoogle"></span></button><br>
<button id="resurrectWithGoogleText" ><img src="icons/cacheicons/google.png"> <span id="labelGoogleText"></span></button><br>
<button id="resurrectWithArchive" ><img src="icons/cacheicons/waybackmachine.png"> <span id="labelArchive"></span></button><br>
<button id="resurrectWithArchiveIs" ><img src="icons/cacheicons/archiveis.png"> <span id="labelArchiveIs"></span></button><br>
<button id="resurrectWithWebcitation"><img src="icons/cacheicons/webcitation.png"> <span id="labelWebcitation"></span></button><br>
<hr>
<input type="radio" name="openIn" value="0" id="ResurrectInCurrentTab"><label for="ResurrectInCurrentTab" id="labelCurrentTab"></label></br>
<input type="radio" name="openIn" value="1" id="ResurrectInNewTab" ><label for="ResurrectInNewTab" id="labelNewTab"></label></br>
<input type="radio" name="openIn" value="2" id="ResurrectInNewBGTab" ><label for="ResurrectInNewBGTab" id="labelNewBGTab"></label></br>
<input type="radio" name="openIn" value="3" id="ResurrectInNewWindow" ><label for="ResurrectInNewWindow" id="labelNewWindow"></label></br>
<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>
<button data-locale="resurrectArchive" data-gen="genIaUrl">
<img src="icons/cacheicons/waybackmachine.png">
</button>
<button data-locale="resurrectArchiveIs" data-gen="genArchiveIsUrl">
<img src="icons/cacheicons/archiveis.png">
</button>
<button data-locale="resurrectWebcitation" data-gen="genWebCiteUrl">
<img src="icons/cacheicons/webcitation.png">
</button>
<br>
<label data-locale="resurrectConfigCurrentTab">
<input type="radio" name="openIn" value="0">
</label>
<label data-locale="resurrectConfigNewTab">
<input type="radio" name="openIn" value="1">
</label>
<label data-locale="resurrectConfigBgTab">
<input type="radio" name="openIn" value="2">
</label>
<label data-locale="resurrectConfigNewWindow">
<input type="radio" name="openIn" value="3">
</label>
</form>
<script src="common.js"></script>

Voir le fichier

@ -1,49 +1,34 @@
updatePopupRadios = function () {
setOpenIn(document.querySelector('input[name="openIn"]:checked').value)
}
document.addEventListener('DOMContentLoaded', function() {
browser.storage.local.get ("openIn").then(function(res) {
switch (Number(res.openIn)) {
case openInEnum.CURRENT_TAB:
document.querySelector("#ResurrectInCurrentTab").checked = true;
break;
case openInEnum.NEW_TAB:
document.querySelector("#ResurrectInNewTab").checked = true;
break;
case openInEnum.NEW_BGTAB:
document.querySelector("#ResurrectInNewBGTab").checked = true;
break;
case openInEnum.NEW_WINDOW:
document.querySelector("#ResurrectInNewWindow").checked = true;
break;
default:
document.querySelector("#ResurrectInCurrentTab").checked = true;
onError("can't read openIn from local storage");
}
chrome.storage.local.get('openIn', res => {
document.querySelectorAll('input[type=radio]').forEach(el => {
el.checked = el.value == res.openIn;
});
document.querySelector("#labelGoogle").innerHTML = browser.i18n.getMessage("ResurrectGoogle");
document.querySelector("#labelGoogleText").innerHTML = browser.i18n.getMessage("ResurrectGoogleText");
document.querySelector("#labelArchive").innerHTML = browser.i18n.getMessage("ResurrectArchive");
document.querySelector("#labelArchiveIs").innerHTML = browser.i18n.getMessage("ResurrectArchiveIs");
document.querySelector("#labelWebcitation").innerHTML = browser.i18n.getMessage("ResurrectWebcitation");
document.querySelector("#labelCurrentTab").innerHTML = browser.i18n.getMessage("ResurrectInCurrentTab");
document.querySelector("#labelNewTab").innerHTML = browser.i18n.getMessage("ResurrectInNewTab");
document.querySelector("#labelNewBGTab").innerHTML = browser.i18n.getMessage("ResurrectInNewBGTab");
document.querySelector("#labelNewWindow").innerHTML = browser.i18n.getMessage("ResurrectInNewWindow");
document.querySelector("#ResurrectInCurrentTab").onchange = updatePopupRadios
document.querySelector("#ResurrectInNewTab").onchange = updatePopupRadios
document.querySelector("#ResurrectInNewBGTab").onchange = updatePopupRadios
document.querySelector("#ResurrectInNewWindow").onchange = updatePopupRadios
browser.tabs.query({active:true,currentWindow:true}).then(function(tabObj){
pageURL = tabObj[0].url;
document.querySelector("#resurrectWithGoogle").onclick = function(){goToURL (genGoogleURL (pageURL), openIn);window.close()};
document.querySelector("#resurrectWithGoogleText").onclick = function(){goToURL (genGoogleTextURL (pageURL), openIn);window.close()};
document.querySelector("#resurrectWithArchive").onclick = function(){goToURL (genArchiveURL (pageURL), openIn);window.close()};
document.querySelector("#resurrectWithArchiveIs").onclick = function(){goToURL (genArchiveIsURL (pageURL), openIn);window.close()};
document.querySelector("#resurrectWithWebcitation").onclick = function(){goToURL (genWebcitationURL(pageURL), openIn);window.close()};
}, onError);
});
document.querySelectorAll('*[data-locale]').forEach(el => {
el.appendChild(document.createTextNode(
' ' + chrome.i18n.getMessage(el.getAttribute('data-locale'))
));
});
function onOpenInChange() {
setOpenIn(document.querySelector('input[name="openIn"]:checked').value);
};
document.querySelectorAll('input[type=radio]').forEach(el => {
el.addEventListener('click', onOpenInChange, true);
});
function resurrect(gen) {
return function() {
chrome.tabs.query({active: true, currentWindow: true}, tabObj => {
goToUrl(gen(tabObj[0].url), openIn);
window.close();
});
}
}
document.querySelectorAll('button').forEach(el => {
el.addEventListener(
'click', resurrect(window[el.getAttribute('data-gen')]), true);
});