mirror of
https://codeberg.org/LibRedirect/libredirect.git
synced 2025-02-09 00:28:48 +01:00
Added PokeTube https://github.com/libredirect/libredirect/issues/623
This commit is contained in:
parent
97365e1237
commit
412fe20070
@ -1,32 +0,0 @@
|
||||
pipeline:
|
||||
instancefetch:
|
||||
image: python:bullseye
|
||||
secrets: [token, mail]
|
||||
when:
|
||||
- event: cron
|
||||
cron: instance_updater
|
||||
commands:
|
||||
- python -m pip install --upgrade pip
|
||||
- pip install requests colorama
|
||||
- python src/instances/get_instances.py
|
||||
# SSH configuration
|
||||
- mkdir ~/.ssh
|
||||
- ssh-keyscan -t ed25519 codeberg.org >> ~/.ssh/known_hosts
|
||||
- eval `ssh-agent`
|
||||
- echo "$TOKEN" | tr -d '\r' | ssh-add -
|
||||
# Git configuration
|
||||
- git config --global user.email $MAIL
|
||||
- git config --global user.name "Woodpecker CI"
|
||||
- git commit -am "updated instances"
|
||||
- git remote set-url origin git@codeberg.org:libredirect/libredirect.git
|
||||
- git push --set-upstream origin master
|
||||
lint:
|
||||
image: node:lts-alpine
|
||||
when:
|
||||
event: [push, pull_request]
|
||||
path:
|
||||
exclude: ["src/instances/**"]
|
||||
include: ["src/**"]
|
||||
commands:
|
||||
- npm i
|
||||
- npx web-ext lint --source-dir ./src/
|
@ -5,13 +5,9 @@ A web extension that redirects YouTube, Twitter, TikTok... requests to alternati
|
||||
[![Matrix Badge](https://img.shields.io/matrix/libredirect:matrix.org?label=matrix%20chat)](https://matrix.to/#/#libredirect:matrix.org)
|
||||
[![Firefox users Badge](https://img.shields.io/amo/users/libredirect?label=Firefox%20users)](https://addons.mozilla.org/firefox/addon/libredirect/)
|
||||
[![LibrePay Badge](https://img.shields.io/liberapay/gives/libredirect?label=Liberapay)](https://liberapay.com/LibRedirect)
|
||||
|
||||
[![OpenCollective Badge](https://opencollective.com/libredirect/tiers/badge.svg)](https://opencollective.com/libredirect#category-CONTRIBUTE)
|
||||
|
||||
|
||||
|
||||
[![Firefox Add-on](./img/badge-amo.png)](https://addons.mozilla.org/firefox/addon/libredirect/)
|
||||
|
||||
<a href="./chromium.md">
|
||||
<img src ="./img/badge-chromium.png" height=60 >
|
||||
</a>
|
||||
@ -20,7 +16,7 @@ A web extension that redirects YouTube, Twitter, TikTok... requests to alternati
|
||||
<img src ="./img/2.png" width=350>
|
||||
<img src ="./img/3.png" width=350>
|
||||
|
||||
- Youtube <span>→</span> [Invidious](https://github.com/iv-org/invidious), [Piped](https://github.com/TeamPiped/Piped), [Piped-Material](https://github.com/mmjee/Piped-Material), [CloudTube](https://sr.ht/~cadence/tube/), [FreeTube](https://github.com/FreeTubeApp/FreeTube), [Yattee](https://github.com/yattee/yattee)
|
||||
- Youtube <span>→</span> [Invidious](https://github.com/iv-org/invidious), [Piped](https://github.com/TeamPiped/Piped), [Piped-Material](https://github.com/mmjee/Piped-Material), [CloudTube](https://sr.ht/~cadence/tube/), [PokeTube](https://codeberg.org/Ashley/poketube/), [FreeTube](https://github.com/FreeTubeApp/FreeTube), [Yattee](https://github.com/yattee/yattee)
|
||||
- Youtube Music <span>→</span> [Beatbump](https://github.com/snuffyDev/Beatbump), [Hyperpipe](https://codeberg.org/Hyperpipe/Hyperpipe)
|
||||
- Twitter <span>→</span> [Nitter](https://github.com/zedeus/nitter)
|
||||
- TikTok <span>→</span> [ProxiTok](https://github.com/pablouser1/ProxiTok)
|
||||
@ -39,8 +35,9 @@ A web extension that redirects YouTube, Twitter, TikTok... requests to alternati
|
||||
- StackOverflow <span>→</span> [AnonymousOverflow](https://github.com/httpjamesm/AnonymousOverflow)
|
||||
- Goodreads <span>→</span> [BiblioReads](https://github.com/nesaku/BiblioReads)
|
||||
- Wikipedia <span>→</span> [Wikiless](https://wikiless.org)
|
||||
- Snopes <span>→</span> [Suds](https://git.vern.cc/cobra/Suds)
|
||||
|
||||
# Please read the [FAQ](https://libredirect.github.io/faq.html) if you have any questions!
|
||||
**Please read the [FAQ](https://libredirect.github.io/faq.html) if you have any questions!**
|
||||
|
||||
We're now on <a rel="me" href="https://fosstodon.org/@libredirect">Mastodon</a>
|
||||
|
||||
|
@ -148,6 +148,19 @@ function redirect(url, type, initiator, forceRedirection) {
|
||||
case "freetube": {
|
||||
return `freetube://https://youtu.be${url.pathname}${url.search}`.replace(/watch\?v=/, "")
|
||||
}
|
||||
case "poketube": {
|
||||
if (url.pathname.startsWith('/channel')) {
|
||||
const reg = /\/channel\/(.*)\/?$/.exec(url.pathname)
|
||||
if (reg) {
|
||||
const id = reg[1]
|
||||
return `${randomInstance}/channel?id=${id}${url.search}`
|
||||
}
|
||||
}
|
||||
if (/\/@[a-z]+\//.exec(url.pathname)) {
|
||||
return randomInstance
|
||||
}
|
||||
return `${randomInstance}${url.pathname}${url.search}`
|
||||
}
|
||||
case "simplyTranslate": {
|
||||
return `${randomInstance}/${url.search}`
|
||||
}
|
||||
@ -551,6 +564,7 @@ const defaultInstances = {
|
||||
'piped': ['https://pipedapi-libre.kavin.rocks'],
|
||||
'pipedMaterial': ['https://piped-material.xn--17b.net'],
|
||||
'cloudtube': ['https://tube.cadence.moe'],
|
||||
'poketube': ['https://poketube.fun'],
|
||||
'proxiTok': ['https://proxitok.pabloferreiro.es'],
|
||||
'send': ['https://send.vis.ee'],
|
||||
'nitter': ['https://nitter.net'],
|
||||
|
@ -71,6 +71,16 @@
|
||||
"embeddable": false,
|
||||
"instanceList": false,
|
||||
"url": "https://github.com/yattee/yattee"
|
||||
},
|
||||
"poketube": {
|
||||
"excludeTargets": [
|
||||
2,
|
||||
3
|
||||
],
|
||||
"name": "PokeTube",
|
||||
"embeddable": true,
|
||||
"instanceList": true,
|
||||
"url": "https://codeberg.org/Ashley/poketube/"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
|
Loading…
x
Reference in New Issue
Block a user