Skip to content

Commit

Permalink
Many things
Browse files Browse the repository at this point in the history
Made all instances updateable

Added hyperpipe

Closes #398

Added cloudtube

Closes #397

Start using prettier
  • Loading branch information
BobIsMyManager committed Jul 26, 2022
1 parent b7859ac commit 2a0596f
Show file tree
Hide file tree
Showing 80 changed files with 7,981 additions and 7,010 deletions.
58 changes: 29 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [master]
schedule:
- cron: '43 18 * * 3'
- cron: "43 18 * * 3"

jobs:
analyze:
Expand All @@ -32,39 +32,39 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ["javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@ name: instances-updater

on:
schedule:
- cron: '10 22 */3 * *'
- cron: "10 22 */3 * *"

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
steps:
- name: get repo content
uses: actions/checkout@v2

- name: setup python
uses: actions/setup-python@v2
with:
python-version: '3.8' # install the python version needed
python-version: "3.8" # install the python version needed

- name: install python packages
run: |
python -m pip install --upgrade pip
pip install requests bs4 colorama
- name: run script
run: python src/instances/get_instances.py

- name: commit files
run: |
git config --local user.email "action@github.com"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
node-version: "16"
- run: npm install
- run: npm test
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
web-ext-artifacts/
.DS_Store
nod
node_modules
package-lock.json
src/instances/data.json
src/instances/blacklist.json
src/pages/options/*.html
src/pages/popup/*.html
src/_locales/
.vscode
23 changes: 23 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"semi": false,
"tabWidth": 2,
"useTabs": true,
"arrowParens": "avoid",
"printWidth": 200,
"overrides": [
{
"files": ["*.js", "*.json"],
"options": {
"tabWidth": 2,
"singleQuote": false
}
},
{
"files": ["*.html", "*.py"],
"options": {
"tabWidth": 4,
"singleQuote": true
}
}
]
}
16 changes: 9 additions & 7 deletions Privacy-Policy.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
## Data collected
* LibRedirect does not collect any Personal Information of any kind.
* LibRedirect doesn't embed any kind of analytics in its code.
* All aspects of the extension work locally in your browser, with the exception of
OpenStreetMap (OSM) reverse geocoding, done via the [OSM Nomantim API](https://nominatim.org/release-docs/develop/api/Overview/),
used as part of OSM redirects, which can be disabled by toggling the OSM redirects.
* It also connects to [this url](https://raw.githubusercontent.com/libredirect/libredirect/master/src/instances/data.json) to update the Instances List. Though this only gets triggered when the user presses the `Update Instances` button.
* For bibliogram instances. To set a cookie you should send an http request to the server as the server stores settings values itself and gives you a token to access them.

- LibRedirect does not collect any Personal Information of any kind.
- LibRedirect doesn't embed any kind of analytics in its code.
- All aspects of the extension work locally in your browser, with the exception of
OpenStreetMap (OSM) reverse geocoding, done via the [OSM Nomantim API](https://nominatim.org/release-docs/develop/api/Overview/),
used as part of OSM redirects, which can be disabled by toggling the OSM redirects.
- It also connects to [this url](https://raw.githubusercontent.com/libredirect/libredirect/master/src/instances/data.json) to update the Instances List. Though this only gets triggered when the user presses the `Update Instances` button.
- For bibliogram instances. To set a cookie you should send an http request to the server as the server stores settings values itself and gives you a token to access them.

## Future Changes

If we decide to change our privacy policy, we will post those changes on this page.
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ A web extension that redirects YouTube, Twitter, Instagram... requests to altern

[![Firefox Add-on](./img/badge-amo.png)](https://addons.mozilla.org/firefox/addon/libredirect/) 
<a href="https://microsoftedge.microsoft.com/addons/detail/libredirect/aodffkeankebfonljgbcfbbaljopcpdb">
<img src="./img/badge-ms.png" height=60>
<img src="./img/badge-ms.png" height=60>
</a>&nbsp;
<a href="./chromium.md">
<img src ="./img/badge-chromium.png" height=60 >
<img src ="./img/badge-chromium.png" height=60 >
</a>

<img src ="./img/1.png" width=350>&nbsp;
Expand Down Expand Up @@ -42,6 +42,7 @@ Send Files => [Send](https://gitlab.com/timvisee/send)
[FAQ](https://libredirect.github.io/faq.html)

## Donate

[![Liberapay](./img/liberapay.svg)](https://liberapay.com/LibRedirect)&nbsp;
[![Patreon](./img/patreon.svg)](https://patreon.com/LibRedirect)&nbsp;
[![Buy me a coffee](./img/bmc.svg)](https://www.buymeacoffee.com/libredirect)
Expand All @@ -52,54 +53,67 @@ ETH: 0x896E5796Da76E49A400A9186E1c459CD2C64b4E8\
XMR: 4AM5CVfaGsnEXQQjZSzJvaWufe7pT86ubcZPr83fCjb2Hn3iwcForTWFy2Z3ugXcufUwHaGcucfPMFgPXBFSYGFvNrmV5XR

## Mirror Repos

[![GitHub](https://raw.githubusercontent.com/ManeraKai/manerakai/main/icons/github.svg)](https://github.com/libredirect/libredirect/)&nbsp;&nbsp;
[![Codeberg](https://raw.githubusercontent.com/ManeraKai/manerakai/main/icons/codeberg.svg)](https://codeberg.org/LibRedirect/libredirect)&nbsp;&nbsp;

## Translate

[![Weblate](./img/weblate.svg)](https://hosted.weblate.org/projects/libredirect/extension)

## Development

### Install Dependencies

[Node.js](https://nodejs.org/) latest LTS is recommended

```
npm update
npm install
```

If you are modifying any files ending with .pug, the pug cli needs to be installed with the following command (with root privileges):

```
npm install -g pug-cli
```
and then run `./script.sh` to generate pages in the background.

and then run `npm run pug` to generate pages in the background.

### Build

```
npm run build
```

### Test

```
npm run test
```

### Test in Firefox

```
npm run start
```

### Install temporarily

open `about:addons`\
click on the settings button below the addon search bar and select `debug add-on`\
press `load temporarily addon`

### Install in Firefox ESR, Developer Edition, Nightly

open `about:config`\
set `xpinstall.signatures.required` to `false`\
open `about:addons`\
click on the gear shaped `settings` button and select `Install Add-on From File...`\
select `libredirect-VERSION.zip` from `web-ext-artifacts` folder

### Install in Chromium browsers

open `chrome://extensions`\
enable `dev mode`\
select `load unpacked extension`\
Expand Down
2 changes: 2 additions & 0 deletions chromium.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## Linux

- Download the latest `.crx` file: [libredirect-2.2.1.crx](https://github.com/libredirect/libredirect/releases/download/v2.2.1/libredirect-2.2.1.crx)
- Open `chrome://extensions`
- Enable `dev mode`
Expand All @@ -8,6 +9,7 @@
Updates are automatic

## Windows, MacOS

- Download the latest release [libredirect-2.2.1.zip](https://github.com/libredirect/libredirect/releases/download/v2.2.1/libredirect-2.2.1.zip)
- Unzip it with `Auto detect subfolder`
- Open `chrome://extensions`
Expand Down
58 changes: 31 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
{
"name": "libredirect",
"description": "Redirects YouTube, Twitter, Instagram and more to privacy friendly frontends.",
"engines": {
"node": ">=16.13.1",
"npm": ">=8.1.2"
},
"scripts": {
"start": "web-ext run --browser-console --source-dir ./src/",
"build": "web-ext build --overwrite-dest --source-dir ./src/",
"test": "web-ext lint --source-dir ./src/ || true"
},
"repository": {
"type": "git",
"url": "git+https://github.com/LibRedirect/LibRedirect.git"
},
"author": "LibRedirect",
"license": "GPL-3.0-only",
"bugs": {
"url": "https://github.com/LibRedirect/LibRedirect/issues"
},
"homepage": "https://github.com/LibRedirect/LibRedirect",
"devDependencies": {
"web-ext": "^6.7.0"
},
"dependencies": {
"buffer": "^6.0.3"
}
"name": "libredirect",
"description": "Redirects YouTube, Twitter, Instagram and more to privacy friendly frontends.",
"engines": {
"node": ">=16.13.1",
"npm": ">=8.1.2"
},
"scripts": {
"start": "web-ext run --browser-console --source-dir ./src/",
"build": "web-ext build --overwrite-dest --source-dir ./src/",
"test": "web-ext lint --source-dir ./src/ || true",
"pug": "pug ./src/pages/options/*.pug ./src/pages/popup/ -P -w",
"prettier": "npx prettier --write .",
"instances": "python3 src/instances/get_instances.py; git update-index --assume-unchanged src/instances/blacklist.json src/instances/data.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/LibRedirect/LibRedirect.git"
},
"author": "LibRedirect",
"license": "GPL-3.0-only",
"bugs": {
"url": "https://github.com/LibRedirect/LibRedirect/issues"
},
"homepage": "https://github.com/LibRedirect/LibRedirect",
"devDependencies": {
"prettier": "2.7.1",
"web-ext": "^6.7.0"
},
"dependencies": {
"buffer": "^6.0.3"
}
}
1 change: 0 additions & 1 deletion script.sh

This file was deleted.

Loading

0 comments on commit 2a0596f

Please sign in to comment.