Skip to content

Commit

Permalink
馃摝Initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
yankeexe committed Aug 26, 2023
0 parents commit f19dac1
Show file tree
Hide file tree
Showing 16 changed files with 2,177 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"env": {
"browser": true,
"webextensions": true
},
"extends": ["eslint:recommended", "prettier"],
"overrides": [],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "script"
},
"rules": {
"no-alert": "error",
"no-console": "error"
}
}
23 changes: 23 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check Lint and formatting
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"

jobs:
lint:
runs-on: ubuntu-latest
name: "Eslint Prettier"
steps:
- uses: actions/checkout@v3
- name: Setup Environment
uses: actions/setup-node@v3
with:
node-version: 16
- name: "Install dependencies"
run: npm install
- name: Run linter
run: npm run lint && npm run format:check
19 changes: 19 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Releaser
on:
push:
tags:
- "*"
jobs:
release:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APP_NAME: archive_is
runs-on: ubuntu-latest
permissions: write-all
name: Create GH Release
steps:
- uses: actions/checkout@v3
- name: Build Artifacts
run: ./release.sh
- name: Create Release
run: gh release create ${GITHUB_REF#refs/*/} -t ${GITHUB_REF#refs/*/} ${APP_NAME}_chrome.zip ${APP_NAME}_firefox.zip --generate-notes
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
web-ext-artifacts
.DS_Store
node_modules/

*.zip
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"semi": false,
"tabWidth": 2,
"overrides": [
{
"files": ["*.json", "*rc"],
"options": {
"tabWidth": 4
}
}
]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Yankee Maharjan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<h1 align="center"> archive.is Browser Extension </h1>

Reload the current page on wayback machine

## Install as an extension from source

### Chrome

1. Clone this repository or [download the latest release](https://github.com/yankeexe/wayback-machine-browser-extension/releases/latest).
2. Using Chromium based browser, navigate to `chrome://extensions/` and enable `Developer mode` in the upper right corner.
3. Click on the `Load unpacked` button.
4. Go to the directory where repo was cloned and select it.
5. Browse the internet without paywall :money_with_wings:

### Firefox

> Currently extension is not available on Add-Ons Marketplace.
1. Download the [latest release for Firefox](https://github.com/yankeexe/wayback-machine-browser-extension/releases/latest)
2. Go to `about:debugging`
3. Click on `This Firefox` on the left menu
4. Click on `Load Temporary Add-on`
5. Go to the directory where repo was cloned and select any file inside of it.

## Usage

<p align="center">
<img src="https://i.imgur.com/a18wwI2.gif", width=500>
</p>
Binary file added assets/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
chrome.action.onClicked.addListener(() => {
chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
const url = new URL(tabs[0].url)

if (url.protocol == "https:") {
chrome.tabs.update({
url: `https://archive.is/${url.href}`,
})
}
})
})
18 changes: 18 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "Wayback machine",
"description": "View current page on wayback machine: archive.is",
"version": "0.1",
"author": "Yankee Maharjan",
"manifest_version": 3,
"background": {
"service_worker": "background.js"
},
"permissions": ["activeTab"],
"action": {
"default_icon": {
"16": "assets/16x16.png",
"48": "assets/48x48.png",
"128": "assets/128x128.png"
}
}
}
19 changes: 19 additions & 0 deletions manifest_firefox.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "Wayback machine",
"description": "View current page on wayback machine: archive.is",
"version": "0.1",
"author": "Yankee Maharjan",
"manifest_version": 2,
"background": {
"scripts": ["background.js"],
"persistent": false
},
"permissions": ["activeTab"],
"browser_action": {
"default_icon": {
"16": "assets/16x16.png",
"48": "assets/48x48.png",
"128": "assets/128x128.png"
}
}
}
Loading

0 comments on commit f19dac1

Please sign in to comment.