diff --git a/src/assets/images/waybackMachine-icon-light.svg b/src/assets/images/waybackMachine-icon-light.svg new file mode 100644 index 0000000..2b3d3fd --- /dev/null +++ b/src/assets/images/waybackMachine-icon-light.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + diff --git a/src/assets/images/waybackMachine-icon.svg b/src/assets/images/waybackMachine-icon.svg new file mode 100644 index 0000000..2a66192 --- /dev/null +++ b/src/assets/images/waybackMachine-icon.svg @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index 4880874..624edc9 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -481,6 +481,15 @@ function redirect(url, type, initiator, forceRedirection) { if (url.pathname.startsWith('/email')) return return `${randomInstance}${url.pathname}${url.search}` } + case "waybackClassic": { + const regex = /^\/\web\/[0-9]+\*\/(.*)/.exec(url.pathname) + console.log('regex', regex) + if (regex) { + const link = regex[1] + return `${randomInstance}/cgi-bin/history.cgi?utf8=✓&q=${encodeURIComponent(link)}` + } + return `${randomInstance}` + } default: { return `${randomInstance}${url.pathname}${url.search}` } @@ -608,7 +617,8 @@ const defaultInstances = { 'anonymousOverflow': ['https://code.whatever.social'], 'biblioReads': ['https://biblioreads.ml'], 'wikiless': ['https://wikiless.org'], - 'suds': ['https://sd.vern.cc'] + 'suds': ['https://sd.vern.cc'], + 'waybackClassic': ['https://wayback-classic.net'] } function initDefaults() { diff --git a/src/config.json b/src/config.json index 3340f0e..5eea75b 100644 --- a/src/config.json +++ b/src/config.json @@ -632,6 +632,26 @@ "imageType": "svg", "embeddable": false, "url": "https://www.snopes.com" + }, + "waybackMachine": { + "frontends": { + "waybackClassic": { + "name": "Wayback Classic", + "instanceList": true, + "url": "https://github.com/ticky/wayback-classic" + } + }, + "targets": [ + "^https?:\\/{2}web\\.archive\\.org\\/" + ], + "name": "Wayback Machine", + "options": { + "enabled": false, + "unsupportedUrls": "bypass" + }, + "imageType": "svgMono", + "embeddable": false, + "url": "https://web.archive.org" } } } \ No newline at end of file diff --git a/src/pages/stylesheets/styles.css b/src/pages/stylesheets/styles.css index b493af6..f8eed25 100644 --- a/src/pages/stylesheets/styles.css +++ b/src/pages/stylesheets/styles.css @@ -48,6 +48,7 @@ div.some-block input[type="checkbox"] { display: flex; align-items: center; text-decoration: none; + width: min-content; color: var(--text); } @@ -110,7 +111,7 @@ section.option-block h2 { body.option { display: flex; padding: 40px; - width: 1130px; + width: 1150px; } section.links {