Compare commits
No commits in common. 'master' and 'v0.0.2' have entirely different histories.
@ -1,24 +0,0 @@
|
||||
'use strict';
|
||||
module.exports = {
|
||||
extends: ['eslint:recommended', 'eslint-config-prettier'],
|
||||
parserOptions: {
|
||||
ecmaVersion: 2020,
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
es6: true,
|
||||
},
|
||||
globals: {
|
||||
browser: 'readonly',
|
||||
chrome: 'readonly',
|
||||
},
|
||||
rules: {
|
||||
strict: ['error', 'global'],
|
||||
'no-unused-vars': ['error', { vars: 'local' }],
|
||||
eqeqeq: ['error', 'always', { null: 'ignore' }],
|
||||
curly: ['error', 'multi-line'],
|
||||
'no-var': 'error',
|
||||
'no-func-assign': 'off',
|
||||
'no-inner-declarations': 'off',
|
||||
},
|
||||
};
|
@ -1,16 +0,0 @@
|
||||
name: lint_js
|
||||
|
||||
on: [pull_request, push]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: lint_js
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
- run: npm run format -- --check
|
@ -1,91 +1,45 @@
|
||||
![Tube Archivist Companion](assets/tube-archivist-companion-banner.png?raw=true "Tube Archivist Companion Banner")
|
||||
# Tube Archivist Companion
|
||||
|
||||
<h1 align="center">Browser Extension for Tube Archivist</h1>
|
||||
<div align="center">
|
||||
<a href="https://www.tilefy.me" target="_blank"><img src="https://tiles.tilefy.me/t/tubearchivist-firefox.png" alt="tubearchivist-firefox" title="TA Companion Firefox users" height="50" width="190"/></a>
|
||||
<a href="https://www.tilefy.me" target="_blank"><img src="https://tiles.tilefy.me/t/tubearchivist-chrome.png" alt="tubearchivist-chrome" title="TA Companion Chrome users" height="50" width="190"/></a>
|
||||
</div>
|
||||
![popup screenshot](assets/screenshot.png?raw=true "Tube Archivist Companion Popup")
|
||||
|
||||
## Core Functionality
|
||||
This is a browser extension to bridge YouTube with [Tube Archivist](https://github.com/tubearchivist/tubearchivist), your self hosted YouTube media server.
|
||||
- Add your Tube Archivist connection details in the addon popup.
|
||||
- On YouTube video pages, inject a download button to download that video and a subscribe button to subscribe to that channel.
|
||||
- On YouTube channel pages, inject a button to subscribe to the channel or download the complete channel. Regarding the channel subpages, this follows the same rules as adding to the queue over the form.
|
||||
- Throughout most places, hover over the video title to reveal a download button for that video.
|
||||
- Sync your cookies for yt-dlp.
|
||||
|
||||
## Screenshots
|
||||
![popup screenshot](assets/tac-screenshot.png?raw=true "Tube Archivist Companion Popup")
|
||||
Popup to enter your connection details.
|
||||
<br><br>
|
||||
|
||||
![video page](assets/screenshot-video.png?raw=true "Tube Archivist Companion Video Page")
|
||||
Button injected on video page to download the video or subscribe to the channel.
|
||||
<br><br>
|
||||
|
||||
![search page](assets/tac-screenshot-search.jpg?raw=true "Tube Archivist Companion Search Page")
|
||||
Download button injected showing when hovering over the video title.
|
||||
<br><br>
|
||||
|
||||
![channel page](assets/tac-screenshot-channel.jpg?raw=true "Tube Archivist Companion Channel Page")
|
||||
Channel button injected to subscribe or download whole channel, video download button showing when hovering over the video title.
|
||||
<br>
|
||||
A browser extension to bridge YouTube with your Tube Archivist service.
|
||||
|
||||
## Install
|
||||
- Firefox: The addon is available on the [Extension store](https://addons.mozilla.org/addon/tubearchivist-companion/).
|
||||
- Chrome: The addon is available on the [Chrome Web Store](https://chrome.google.com/webstore/detail/tubearchivist-companion/jjnkmicfnfojkkgobdfeieblocadmcie).
|
||||
|
||||
## Update
|
||||
After a new release here on GitHub, you'll get updates automatically in your browser. Due to the verification process, for Firefox this usually takes 1-2 hours, for Chrome 2-3 days.
|
||||
|
||||
## Permissions
|
||||
- **Access your data for www.youtube.com**: Needed to inject download and subscribe buttons directly into the page.
|
||||
- **Storage**: Needed to store your connection details.
|
||||
- **Cookie**: Needed to read your cookies for youtube.com to access restricted videos.
|
||||
- **Access your data for www.youtube.com**: Needed for the addon to know your current page on YouTube to send the link to Tube Archivist.
|
||||
- **Storage**: Needed to store your connection details, needed to store your last visited YouTube link within the browser.
|
||||
|
||||
## Setup
|
||||
- **URL**: This is where your Tube Archivist instance is located. Can be a host name or an IP address. Add the port if needed at the end, e.g. `:8000`.
|
||||
- **API key**: You can find your API key on the settings page of your Tube Archivist instance.
|
||||
- **URL**: This is where your Tube Archivist instance is located. Can be a host name or a IP address, use a full URL with protocol, e.g. *http://*.
|
||||
- **Port**: Network port of TA.
|
||||
- **API key**: You can find your API key on the settings page of your Tube Archivist instance.
|
||||
|
||||
A green checkmark will appear next to the *Save* button if your connection is working.
|
||||
|
||||
## Options
|
||||
- **Sync YouTube cookies**: Send your cookies to TubeArchivist to use for yt-dlp requests.
|
||||
- **Autostart**: Autostart and prioritize videos send from this extension.
|
||||
## All great things start small
|
||||
This extension allows you to do the following:
|
||||
- Add your Tube Archivist connection details in the addon popup
|
||||
- Add a download button to the popup for YouTube links
|
||||
- Add a subscribe button to subscribe to channels and playlists
|
||||
|
||||
## Test this extension
|
||||
Before continuing loading the temporary extension here, make sure to deactivate/delete the main extension first.
|
||||
|
||||
Symlink/copy the correct manifest file for your browser to the expected location, e.g. `ln -s manifest-firefox.json manifest.json`.
|
||||
|
||||
Use the correct manifest file for your browser. Either rename the browser specific file to `manifest.json` before loading the addon or symlink it to the correct location, e.g. `ln -s manifest-firefox.json manifest.json`.
|
||||
- Firefox
|
||||
- Open `about:debugging#/runtime/this-firefox`
|
||||
- Click on *Load Temporary Add-on*
|
||||
- Select the *manifest.json* file to load the addon.
|
||||
- You can *inspect* background.js by lunching the debug tools from there.
|
||||
- Select the *manifest.json* file to load the addon.
|
||||
- Chrome / Chromium
|
||||
- Open `chrome://extensions/`
|
||||
- Toggle *Developer mode* on top right
|
||||
- Click on *Load unpacked*
|
||||
- Open the folder containing the *manifest.json* file.
|
||||
- Click on *Service Worker* to open the dev tools at background.js.
|
||||
|
||||
## Compatibility
|
||||
- Verify that you are running the [latest version](https://github.com/tubearchivist/tubearchivist/releases/latest) of Tube Archivist as the API is under development and will change.
|
||||
- For testing this extension between releases, use the *unstable* builds of Tube Archivist, only for your testing environment.
|
||||
|
||||
## Roadmap
|
||||
Join us on [Discord](https://www.tubearchivist.com/discord) and help us improve and extend this project. This is a list of planned features, in no particular order:
|
||||
- [ ] Implement download/subscribe button for playlists
|
||||
- [ ] Add download buttons to the `/shorts/` pages
|
||||
- [X] Get download and subscribe status from TA to show on the injected buttons
|
||||
- [X] Implement download button for videos on the YouTube homepage over inline preview
|
||||
- [X] Implement download button for videos on playlist
|
||||
- [X] Error handling for connection errors
|
||||
- [X] Dynamically inject buttons with mutation observer
|
||||
|
||||
## Making changes to the JavaScript
|
||||
The JavaScript does not require any build step; you just edit the files directly. However, there is config for eslint and prettier (a linter and formatter respectively); their use is recommended but not required. To use them, install `node`, run `npm i` from the root directory of this repository to install dependencies, then run `npm run lint` and `npm run format` to run eslint and prettier respectively.
|
||||
- Verify that you are running the latest version of Tube Archivist as the API is under development and will change.
|
||||
- For testing this extension between releases, use the *unstable* builds of Tube Archivist, only for your tesing environment.
|
||||
|
||||
## Updating Artwork
|
||||
Google listing is *very* picky. Screenshots need to be exactly **1280x800** in resolution and need to be in *jpg* or *png* without alpha canal.
|
||||
## Help needed
|
||||
Join us on [Discord](https://discord.gg/AFwz8nE7BK) and help us improve and extend this project.
|
||||
|
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 121 KiB |
After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 169 KiB |
Before Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 27 KiB |
@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "tubearchivist-browser-extension",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"lint": "eslint 'extension/**/*.js'",
|
||||
"format": "prettier --write 'extension/**/*.js'"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.26.0",
|
||||
"prettier": "^2.7.1",
|
||||
"eslint-config-prettier": "^8.5.0"
|
||||
},
|
||||
"prettier": {
|
||||
"singleQuote": true,
|
||||
"arrowParens": "avoid",
|
||||
"printWidth": 100
|
||||
}
|
||||
}
|