diff options
-rw-r--r-- | .woodpecker.yml | 32 | ||||
-rw-r--r-- | README.md | 9 | ||||
-rw-r--r-- | src/assets/javascripts/services.js | 14 | ||||
-rw-r--r-- | src/config.json | 10 |
4 files changed, 27 insertions, 38 deletions
diff --git a/.woodpecker.yml b/.woodpecker.yml deleted file mode 100644 index 6786fc51..00000000 --- a/.woodpecker.yml +++ /dev/null @@ -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/ diff --git a/README.md b/README.md index 427e060f..9a0b95ff 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,9 @@ A web extension that redirects YouTube, Twitter, TikTok... requests to alternati [](https://matrix.to/#/#libredirect:matrix.org) [](https://addons.mozilla.org/firefox/addon/libredirect/) [](https://liberapay.com/LibRedirect) - [](https://opencollective.com/libredirect#category-CONTRIBUTE) - - [](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> diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index cdf40b66..66dff154 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -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'], diff --git a/src/config.json b/src/config.json index fcd2f797..3a3ed06b 100644 --- a/src/config.json +++ b/src/config.json @@ -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": [ |