mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-18 06:09:58 +00:00
Merge branch 'current' into stream-close-handling-2
This commit is contained in:
commit
2de4688015
15 changed files with 250 additions and 162 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,3 +1,7 @@
|
|||
# os stuff
|
||||
.DS_Store
|
||||
desktop.ini
|
||||
|
||||
# npm
|
||||
node_modules
|
||||
package-lock.json
|
||||
|
|
122
README.md
122
README.md
|
@ -1,78 +1,80 @@
|
|||
# cobalt
|
||||
Best way to save what you love.
|
||||
Live web app: [cobalt.tools](https://cobalt.tools/)
|
||||
best way to save what you love: [cobalt.tools](https://cobalt.tools/)
|
||||
|
||||
![cobalt logo with repeated logo pattern background](https://raw.githubusercontent.com/wukko/cobalt/current/src/front/icons/pattern.png "cobalt logo with repeated logo pattern background")
|
||||
![cobalt logo with repeated logo (double arrow) pattern background](https://raw.githubusercontent.com/wukko/cobalt/current/src/front/icons/pattern.png "cobalt logo with repeated logo (double arrow) pattern background")
|
||||
|
||||
[![DeepSource](https://deepsource.io/gh/wukko/cobalt.svg/?label=active+issues&token=MsmsJ9zUOKwcQor0yaiFot84)](https://deepsource.io/gh/wukko/cobalt/?ref=repository-badge)
|
||||
## what's cobalt?
|
||||
cobalt is a media downloader that doesn't piss you off. it's fast, friendly, and doesn't have any bullshit that modern web is filled with: ***no ads, trackers, or analytics***.
|
||||
|
||||
## What's cobalt?
|
||||
cobalt is social and media platform downloader that doesn't piss you off.
|
||||
paste the link, get the file, move on. it's that simple. just how it should be.
|
||||
|
||||
It's fast, friendly, and doesn't have any bullshit that modern web is filled with: no ads, trackers, or analytics.
|
||||
Paste the link, get the video, move on. It's that simple. Just how it should be.
|
||||
## supported services
|
||||
this list is not final and keeps expanding over time. if support for a service you want is missing, create an issue (or a pull request 👀).
|
||||
|
||||
## Supported services
|
||||
| Service | Video + Audio | Only audio | Only video | Additional notes or features |
|
||||
| -------- | :---: | :---: | :---: | :----- |
|
||||
| bilibili.com | ✅ | ✅ | ✅ | |
|
||||
| Instagram | ✅ | ✅ | ✅ | Supports photos, videos, and stories. Lets you pick what to save from multi-media posts. |
|
||||
| Instagram Reels | ✅ | ✅ | ✅ | |
|
||||
| Pinterest | ✅ | ✅ | ✅ | Support for videos and stories. |
|
||||
| Reddit | ✅ | ✅ | ✅ | Support for GIFs and videos. |
|
||||
| Rutube | ✅ | ✅ | ✅ | |
|
||||
| SoundCloud | ➖ | ✅ | ➖ | Audio metadata, downloads from private links. |
|
||||
| Streamable | ✅ | ✅ | ✅ | |
|
||||
| TikTok | ✅ | ✅ | ✅ | Supports downloads of: videos with or without watermark, images from slideshow without watermark, full (original) audios. |
|
||||
| Tumblr | ✅ | ✅ | ✅ | Support for audio file downloads. |
|
||||
| Twitch Clips | ✅ | ✅ | ✅ | |
|
||||
| Twitter/X * | ✅ | ✅ | ✅ | Ability to pick what to save from multi-media tweets. |
|
||||
| Vimeo | ✅ | ✅ | ✅ | Audio downloads are only available for dash files. |
|
||||
| Vine Archive | ✅ | ✅ | ✅ | |
|
||||
| VK Videos | ✅ | ❌ | ❌ | |
|
||||
| VK Clips | ✅ | ❌ | ❌ | |
|
||||
| YouTube Videos & Shorts | ✅ | ✅ | ✅ | Support for 8K, 4K, HDR, VR, and high FPS videos. Audio metadata & dubs. h264/av1/vp9 codecs. |
|
||||
| YouTube Music | ➖ | ✅ | ➖ | Audio metadata. |
|
||||
| service | video + audio | only audio | only video | metadata | rich file names |
|
||||
| :-------- | :-----------: | :--------: | :--------: | :------: | :-------------: |
|
||||
| bilibili.com | ✅ | ✅ | ✅ | ➖ | ➖ |
|
||||
| instagram posts & stories | ✅ | ✅ | ✅ | ➖ | ➖ |
|
||||
| instagram reels | ✅ | ✅ | ✅ | ➖ | ➖ |
|
||||
| pinterest | ✅ | ✅ | ✅ | ➖ | ➖ |
|
||||
| reddit | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| rutube | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| soundcloud | ➖ | ✅ | ➖ | ✅ | ✅ |
|
||||
| streamable | ✅ | ✅ | ✅ | ➖ | ➖ |
|
||||
| tiktok | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| tumblr | ✅ | ✅ | ✅ | ➖ | ➖ |
|
||||
| twitch clips | ✅ | ✅ | ✅ | ✅ | ❌ |
|
||||
| twitter/x | ✅ | ✅ | ✅ | ➖ | ➖ |
|
||||
| vimeo | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| vine archive | ✅ | ✅ | ✅ | ➖ | ➖ |
|
||||
| vk videos & clips | ✅ | ❌ | ❌ | ✅ | ✅ |
|
||||
| youtube videos, shorts & music | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
|
||||
This list is not final and keeps expanding over time, make sure to check it once in a while!
|
||||
| emoji | meaning |
|
||||
| :-----: | :---------------------- |
|
||||
| ✅ | supported |
|
||||
| ➖ | impossible/unreasonable |
|
||||
| ❌ | not supported |
|
||||
|
||||
*Reliability of downloads from Twitter is questionable due to its current management.
|
||||
### additional notes or features (per service)
|
||||
| service | notes or features |
|
||||
| :-------- | :----- |
|
||||
| instagram | supports photos, videos, and stories. lets you pick what to save from multi-media posts. |
|
||||
| pinterest | supports videos and stories. |
|
||||
| reddit | supports gifs and videos. |
|
||||
| soundcloud | supports private links. |
|
||||
| tiktok | supports videos with or without watermark, images from slideshow without watermark, and full (original) audios. |
|
||||
| twitter/x | lets you pick what to save from multi-media posts. may not be 100% reliable due to current management. |
|
||||
| vimeo | audio downloads are only available for dash. |
|
||||
| youtube | supports videos, music, and shorts. 8K, 4K, HDR, VR, and high FPS videos. rich metadata & dubs. h264/av1/vp9 codecs. |
|
||||
|
||||
## cobalt API
|
||||
cobalt has an open API that you can use in your projects for **free**.
|
||||
It's easy and straightforward to use, [check out the docs](https://github.com/wukko/cobalt/blob/current/docs/API.md) and see for yourself.
|
||||
Feel free to use the main API instance ([co.wuk.sh](https://co.wuk.sh/)) in your projects.
|
||||
## cobalt api
|
||||
cobalt has an open api that you can use in projects *for completely free~*. it's easy and straightforward to use, [check out the docs](https://github.com/wukko/cobalt/blob/current/docs/api.md) to learn how to use it.
|
||||
|
||||
## Host an instance yourself
|
||||
### Requirements
|
||||
- Node.js 18 or above
|
||||
- git
|
||||
you can use the main api instance ([co.wuk.sh](https://co.wuk.sh/)) in your projects.
|
||||
|
||||
Setup script installs all needed `npm` dependencies, but you have to install `Node.js` and `git` yourself.
|
||||
## how to run your own instance
|
||||
if you want to run your own instance for whatever purpose, [follow this guide](https://github.com/wukko/cobalt/blob/current/docs/run-an-instance.md).
|
||||
it's *highly* recommended to use a docker compose method unless you run for developing/debugging purposes.
|
||||
|
||||
1. Clone the repo: `git clone https://github.com/wukko/cobalt`
|
||||
2. Run setup script and follow instructions: `npm run setup`
|
||||
3. Run cobalt via `npm start`
|
||||
4. Done.
|
||||
## sponsors
|
||||
cobalt is sponsored by [royalehosting.net](https://royalehosting.net/), all main instances are currently hosted on their network :)
|
||||
|
||||
You need to host API and web app separately since v.6.0. Setup script will help you with that!
|
||||
## ethics and disclaimer
|
||||
cobalt is a tool for easing content downloads from internet and takes ***zero liability***. you are responsible for what you download, how you use and distribute that content. please be mindful when using content of others and always credit original creators. fair use and credits benefit everyone.
|
||||
|
||||
### Ubuntu 22.04+ workaround
|
||||
`nscd` needs to be installed and running so that the `ffmpeg-static` binary can resolve DNS ([#101](https://github.com/wukko/cobalt/issues/101#issuecomment-1494822258)):
|
||||
cobalt is ***NOT*** a piracy tool and cannot be used as such. it can only download free, publicly accessible content. such content can be easily downloaded through any browser's dev tools. pressing one button is easier, so i made a convenient, ad-less tool for such repeated actions.
|
||||
|
||||
```bash
|
||||
sudo apt install nscd
|
||||
sudo service nscd start
|
||||
```
|
||||
cobalt is my passion project, update schedule depends solely on my free time, motivation, and mood. don't expect any consistency in update releases.
|
||||
|
||||
### Docker
|
||||
It's also possible to run cobalt via Docker. I *highly* recommend using Docker compose.
|
||||
Check out the [example compose file](https://github.com/wukko/cobalt/blob/current/docker-compose.example.yml) and alter it for your needs.
|
||||
## cobalt licenses
|
||||
cobalt code is licensed under [AGPL-3.0](https://github.com/wukko/cobalt/blob/current/LICENSE).
|
||||
|
||||
## Disclaimer
|
||||
cobalt is my passion project, so update schedule depends solely on my free time, motivation, and mood.
|
||||
Don't expect any consistency in that.
|
||||
update banners and various assets of cobalt branding included within the repo are *not* covered by the AGPL-3.0 license and cannot be used using same terms.
|
||||
|
||||
## License
|
||||
cobalt is under [AGPL-3.0](https://github.com/wukko/cobalt/blob/current/LICENSE) license.
|
||||
[Fluent Emoji](https://github.com/microsoft/fluentui-emoji) used in the project is under [MIT](https://github.com/microsoft/fluentui-emoji/blob/main/LICENSE) license.
|
||||
## 3rd party licenses
|
||||
[Fluent Emoji by Microsoft](https://github.com/microsoft/fluentui-emoji) (used in cobalt) is under [MIT](https://github.com/microsoft/fluentui-emoji/blob/main/LICENSE) license.
|
||||
|
||||
[Noto Sans Mono](https://fonts.google.com/noto/specimen/Noto+Sans+Mono/) fonts (used in cobalt) are licensed under the [OFL](https://fonts.google.com/noto/specimen/Noto+Sans+Mono/about) license.
|
||||
|
||||
many update banners were taken from [tenor.com](https://tenor.com/).
|
|
@ -1,3 +0,0 @@
|
|||
files:
|
||||
- source: /src/localization/languages/en.json
|
||||
translation: /src/localization/languages/%two_letters_code%.json
|
73
docs/API.md
73
docs/API.md
|
@ -1,73 +0,0 @@
|
|||
# cobalt API Documentation
|
||||
This document provides info about methods and acceptable variables for all cobalt API requests.<br>
|
||||
|
||||
```
|
||||
⚠️ Main API instance has moved to https://co.wuk.sh/
|
||||
|
||||
Make sure your projects use the correct API domain.
|
||||
```
|
||||
|
||||
## POST: ``/api/json``
|
||||
Main processing endpoint.<br>
|
||||
|
||||
Request Body Type: ``application/json``<br>
|
||||
Response Body Type: ``application/json``
|
||||
|
||||
### Request Body Variables
|
||||
| key | type | variables | default | description |
|
||||
|:--------------------|:------------|:-------------------------------------|:------------|:-------------------------------------------------------------------------------|
|
||||
| ``url`` | ``string`` | Sharable URL encoded as URI | ``null`` | **Must** be included in every request. |
|
||||
| ``vCodec`` | ``string`` | ``h264 / av1 / vp9`` | ``h264`` | Applies only to YouTube downloads. ``h264`` is recommended for phones. |
|
||||
| ``vQuality`` | ``string`` | ``144 / ... / 2160 / max`` | ``720`` | ``720`` quality is recommended for phones. |
|
||||
| ``aFormat`` | ``string`` | ``best / mp3 / ogg / wav / opus`` | ``mp3`` | |
|
||||
| ``filenamePattern`` | ``boolean`` | ``classic / pretty / basic / nerdy`` | ``classic`` | Changes the way files are named. Previews can be seen in the web app. |
|
||||
| ``isAudioOnly`` | ``boolean`` | ``true / false`` | ``false`` | |
|
||||
| ``isNoTTWatermark`` | ``boolean`` | ``true / false`` | ``false`` | Changes whether downloaded TikTok videos have watermarks. |
|
||||
| ``isTTFullAudio`` | ``boolean`` | ``true / false`` | ``false`` | Enables download of original sound used in a TikTok video. |
|
||||
| ``isAudioMuted`` | ``boolean`` | ``true / false`` | ``false`` | Disables audio track in video downloads. |
|
||||
| ``dubLang`` | ``boolean`` | ``true / false`` | ``false`` | Backend uses Accept-Language for YouTube video audio tracks when ``true``. |
|
||||
| ``disableMetadata`` | ``boolean`` | ``true / false`` | ``false`` | Disables file metadata when set to ``true``. |
|
||||
|
||||
### Response Body Variables
|
||||
| key | type | variables |
|
||||
|:---------------|:-----------|:--------------------------------------------------------------|
|
||||
| ``status`` | ``string`` | ``error / redirect / stream / success / rate-limit / picker`` |
|
||||
| ``text`` | ``string`` | Text |
|
||||
| ``url`` | ``string`` | Direct link to a file / link to cobalt's live render |
|
||||
| ``pickerType`` | ``string`` | ``various / images`` |
|
||||
| ``picker`` | ``array`` | Array of picker items |
|
||||
| ``audio`` | ``string`` | Direct link to a file / link to cobalt's live render |
|
||||
|
||||
### Picker Item Variables
|
||||
Item type: ``object``
|
||||
| key | type | variables | description |
|
||||
|:---------------|:-----------|:------------------------------------------------|:--------------------------------------------|
|
||||
| ``type`` | ``string`` | ``video`` | Used only if ``pickerType`` is ``various``. |
|
||||
| ``url`` | ``string`` | Direct link to a file / link to cobalt's live render | |
|
||||
| ``thumb`` | ``string`` | Item thumbnail that's displayed in the picker | Used only for ``video`` type. |
|
||||
|
||||
## GET: ``/api/stream``
|
||||
Content live render streaming endpoint.<br>
|
||||
|
||||
### Request Query Variables
|
||||
| key | variables | description |
|
||||
|:--------|:-----------------|:-------------------------------------------------------------------------------------------------------------------------------|
|
||||
| ``p`` | ``1`` | Used for probing whether user is rate limited. |
|
||||
| ``t`` | Stream token | Unique stream ID. Used for retrieving cached stream info data. |
|
||||
| ``h`` | HMAC | Hashed combination of: (hashed) ip address, stream token, expiry timestamp, and service name. Used for verification of stream. |
|
||||
| ``e`` | Expiry timestamp | |
|
||||
|
||||
## GET: ``/api/serverInfo``
|
||||
Returns current basic server info.<br>
|
||||
Response Body Type: ``application/json``
|
||||
|
||||
### Response Body Variables
|
||||
| key | type | variables |
|
||||
|:--------------|:-----------|:------------------|
|
||||
| ``version`` | ``string`` | cobalt version |
|
||||
| ``commit`` | ``string`` | Git commit |
|
||||
| ``branch`` | ``string`` | Git branch |
|
||||
| ``name`` | ``string`` | Server name |
|
||||
| ``url`` | ``string`` | Server url |
|
||||
| ``cors`` | ``int`` | CORS status |
|
||||
| ``startTime`` | ``string`` | Server start time |
|
79
docs/api.md
Normal file
79
docs/api.md
Normal file
|
@ -0,0 +1,79 @@
|
|||
# cobalt api documentation
|
||||
this document provides info about methods and acceptable variables for all cobalt api requests.
|
||||
|
||||
```
|
||||
👍 you can use co.wuk.sh instance in your projects for free, just don't be an asshole.
|
||||
```
|
||||
|
||||
## POST: `/api/json`
|
||||
cobalt's main processing endpoint.
|
||||
|
||||
request body type: `application/json`
|
||||
response body type: `application/json`
|
||||
|
||||
```
|
||||
⚠️ you must include Accept and Content-Type headers with every POST /api/json request.
|
||||
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
```
|
||||
|
||||
### request body variables
|
||||
| key | type | variables | default | description |
|
||||
|:------------------|:----------|:-----------------------------------|:----------|:-------------------------------------------------------------------------------|
|
||||
| `url` | `string` | URL encoded as URI | `null` | **must** be included in every request. |
|
||||
| `vCodec` | `string` | `h264 / av1 / vp9` | `h264` | applies only to youtube downloads. `h264` is recommended for phones. |
|
||||
| `vQuality` | `string` | `144 / ... / 2160 / max` | `720` | `720` quality is recommended for phones. |
|
||||
| `aFormat` | `string` | `best / mp3 / ogg / wav / opus` | `mp3` | |
|
||||
| `filenamePattern` | `boolean` | `classic / pretty / basic / nerdy` | `classic` | changes the way files are named. previews can be seen in the web app. |
|
||||
| `isAudioOnly` | `boolean` | `true / false` | `false` | |
|
||||
| `isNoTTWatermark` | `boolean` | `true / false` | `false` | changes whether downloaded tiktok videos have watermarks. |
|
||||
| `isTTFullAudio` | `boolean` | `true / false` | `false` | enables download of original sound used in a tiktok video. |
|
||||
| `isAudioMuted` | `boolean` | `true / false` | `false` | disables audio track in video downloads. |
|
||||
| `dubLang` | `boolean` | `true / false` | `false` | backend uses Accept-Language hader for youtube video audio tracks when `true`. |
|
||||
| `disableMetadata` | `boolean` | `true / false` | `false` | disables file metadata when set to `true`. |
|
||||
|
||||
### response body variables
|
||||
| key | type | variables |
|
||||
|:-------------|:---------|:------------------------------------------------------------|
|
||||
| `status` | `string` | `error / redirect / stream / success / rate-limit / picker` |
|
||||
| `text` | `string` | various text, mostly used for errors |
|
||||
| `url` | `string` | direct link to a file or a link to cobalt's live render |
|
||||
| `pickerType` | `string` | `various / images` |
|
||||
| `picker` | `array` | array of picker items |
|
||||
| `audio` | `string` | direct link to a file or a link to cobalt's live render |
|
||||
|
||||
### picker item variables
|
||||
item type: `object`
|
||||
|
||||
| key | type | variables | description |
|
||||
|:--------|:---------|:--------------------------------------------------------|:---------------------------------------|
|
||||
| `type` | `string` | `video` | used only if `pickerType`is `various`. |
|
||||
| `url` | `string` | direct link to a file or a link to cobalt's live render | |
|
||||
| `thumb` | `string` | item thumbnail that's displayed in the picker | used only for `video` type. |
|
||||
|
||||
## GET: `/api/stream`
|
||||
cobalt's live render (or stream) endpoint. used for sending various media content over to the user.
|
||||
|
||||
### request query variables
|
||||
| key | variables | description |
|
||||
|:-----|:-----------------|:-------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `p` | `1` | used for probing whether user is rate limited. |
|
||||
| `t` | stream token | unique stream id. used for retrieving cached stream info data. |
|
||||
| `h` | hmac | hashed combination of: (hashed) ip address, stream token, expiry timestamp, and service name. used for verification of stream. |
|
||||
| `e` | expiry timestamp | |
|
||||
|
||||
## GET: `/api/serverInfo`
|
||||
returns current basic server info.
|
||||
response body type: `application/json`
|
||||
|
||||
### response body variables
|
||||
| key | type | variables |
|
||||
|:------------|:---------|:------------------|
|
||||
| `version` | `string` | cobalt version |
|
||||
| `commit` | `string` | git commit |
|
||||
| `branch` | `string` | git branch |
|
||||
| `name` | `string` | server name |
|
||||
| `url` | `string` | server url |
|
||||
| `cors` | `int` | cors status |
|
||||
| `startTime` | `string` | server start time |
|
|
@ -24,7 +24,7 @@ services:
|
|||
- apiName=eu-nl
|
||||
# if you want to use cookies when fetching data from services, uncomment the next line
|
||||
#- cookiePath=/cookies.json
|
||||
# see src/modules/processing/cookie/cookies_example.json for example file.
|
||||
# see cookies_example.json for example file.
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.scope=cobalt
|
||||
|
49
docs/run-an-instance.md
Normal file
49
docs/run-an-instance.md
Normal file
|
@ -0,0 +1,49 @@
|
|||
# how to host a cobalt instance yourself
|
||||
## using docker compose and package from github (recommended)
|
||||
to run the cobalt docker package, you need to have `docker` and `docker-compose` installed and configured.
|
||||
|
||||
if you need help with installing docker, follow *only the first step* of these tutorials by digitalocean:
|
||||
- [how to install docker](https://www.digitalocean.com/community/tutorial-collections/how-to-install-and-use-docker)
|
||||
- [how to install docker compose](https://www.digitalocean.com/community/tutorial-collections/how-to-install-docker-compose)
|
||||
|
||||
## how to run a cobalt docker package:
|
||||
1. create a folder for cobalt config file, something like this:
|
||||
```sh
|
||||
mkdir cobalt
|
||||
```
|
||||
|
||||
2. go to cobalt folder, and create a docker compose config file:
|
||||
```sh
|
||||
cd cobalt && nano docker-compose.yml
|
||||
```
|
||||
i'm using `nano` in this example, it may not be available in your distro. you can use any other text editor.
|
||||
|
||||
3. copy and paste the [sample config from here](https://github.com/wukko/cobalt/blob/current/docs/examples/docker-compose.example.yml) for either web or api instance (or both, if you wish) and edit it to your needs.
|
||||
make sure to replace default URLs with your own or cobalt won't work correctly.
|
||||
|
||||
4. finally, start the cobalt container (from cobalt directory):
|
||||
```sh
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
if you want your instance to support services that require authentication to view public content, create `cookies.json` file in the same directory as `docker-compose.yml`. example cookies file [can be found here](https://github.com/wukko/cobalt/blob/current/docs/examples/cookies.example.json).
|
||||
|
||||
cobalt package will update automatically thanks to watchtower.
|
||||
|
||||
it's highly recommended to use a reverse proxy (such as nginx) if you want your instance to face the public internet. look up tutorials online.
|
||||
|
||||
## using regular node.js (useful for local development)
|
||||
setup script installs all needed `npm` dependencies, but you have to install `node.js` *(version 18 or above)* and `git` yourself.
|
||||
|
||||
1. clone the repo: `git clone https://github.com/wukko/cobalt`.
|
||||
2. run setup script and follow instructions: `npm run setup`. you need to host api and web instances separately, so pick whichever applies.
|
||||
3. run cobalt via `npm start`.
|
||||
4. done.
|
||||
|
||||
### ubuntu 22.04 workaround
|
||||
`nscd` needs to be installed and running so that the `ffmpeg-static` binary can resolve DNS ([#101](https://github.com/wukko/cobalt/issues/101#issuecomment-1494822258)):
|
||||
|
||||
```bash
|
||||
sudo apt install nscd
|
||||
sudo service nscd start
|
||||
```
|
33
docs/troubleshooting.md
Normal file
33
docs/troubleshooting.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
# self-troubleshooting cobalt
|
||||
```
|
||||
🚧 this page is work-in-progress. expect more guides to be added in the future!
|
||||
```
|
||||
if any issues occur while using cobalt, you can fix many of them yourself. this document aims to provide guides on how to fix most complicated of them.
|
||||
use wiki navigation on right to jump between solutions.
|
||||
|
||||
## how to fix clipboard pasting in firefox
|
||||
you can fix this issue by changing a single preference in `about:config`.
|
||||
|
||||
### steps to enable clipboard functionality
|
||||
1. go to `about:config`:
|
||||
|
||||
![screenshot showing about:config entered into address bar](https://github.com/wukko/cobalt/assets/71202418/9ad78612-a372-4949-aeac-99dfc41e273c)
|
||||
|
||||
2. if asked, read what firefox has to say and press "accept the risk and continue".
|
||||
⚠ tinkering with other preferences may break your browser. **do not** edit them unless you know what you're doing.
|
||||
|
||||
![screenshot showing about:config security warning that reads: "proceed with caution. changing advanced configuration preferences can impact firefox performance or security." lower there's a pre-checked checkbox that says: "warn me when i attempt to access these preferences". lowest element is a blue button that says "accept the risk and continue"](https://github.com/wukko/cobalt/assets/71202418/02328729-dbfe-4ea4-b2ca-7bcf1998c2ca)
|
||||
|
||||
3. search for `dom.events.asyncClipboard.readText`
|
||||
|
||||
![screenshot showing "dom.events.asyncclipboard.readtext" entered into search on about:config page](https://github.com/wukko/cobalt/assets/71202418/7c7f7e3c-6a6a-40df-8436-277489e72e0b)
|
||||
|
||||
4. press the toggle button on very right.
|
||||
|
||||
![screenshot showing "dom.events.asyncclipboard.readtext" preference on about:config page with highlighted toggle button on very right](https://github.com/wukko/cobalt/assets/71202418/b45db18e-f4bf-4f1c-9a8c-f13a63a21335)
|
||||
|
||||
5. "false" should change to "true".
|
||||
|
||||
![screenshot showing "dom.events.asyncclipboard.readtext" preference on about:config page, this one with "true" text highlighted](https://github.com/wukko/cobalt/assets/71202418/4869b4ff-8385-4cd3-ae59-aa2e03a58b5f)
|
||||
|
||||
6. go back to cobalt, reload the page, press `paste and download` button again. this time it works! enjoy simpler downloading experience :)
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"target": "ES2020",
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"**/node_modules/*"
|
||||
]
|
||||
}
|
|
@ -9,6 +9,7 @@
|
|||
--padding-1: 0.75rem;
|
||||
--line-height: 1.65rem;
|
||||
--red: rgb(249, 47, 96);
|
||||
--blue: rgb(47, 138, 249);
|
||||
--gap: 0.5rem;
|
||||
--gap-no-icon: 0.6rem;
|
||||
}
|
||||
|
@ -266,6 +267,11 @@ button:active,
|
|||
height: 2.5rem;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
.logo-sub {
|
||||
color: var(--blue);
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
#download-area {
|
||||
display: flex;
|
||||
|
|
|
@ -125,17 +125,17 @@
|
|||
"SettingsReduceTransparency": "reduce transparency",
|
||||
"SettingsDisableAnimations": "disable animations",
|
||||
"FeatureErrorGeneric": "your browser doesn't allow or support this feature. check if there are any updates available and try again!",
|
||||
"ClipboardErrorFirefox": "you're using firefox where all clipboard reading functionality is disabled.\n\nyou can fix this by following steps listed <a class=\"text-backdrop link\" href=\"{repo}/wiki/Troubleshooting#how-to-fix-clipboard-pasting-in-firefox\" target=\"_blank\">here!</a>\n\n...or you can paste the link manually instead.",
|
||||
"ClipboardErrorFirefox": "you're using firefox where all clipboard reading functionality is disabled.\n\nyou can fix this by following steps listed <a class=\"text-backdrop link\" href=\"{repo}/blob/current/docs/troubleshooting.md#how-to-fix-clipboard-pasting-in-firefox\" target=\"_blank\">here!</a>\n\n...or you can paste the link manually instead.",
|
||||
"ClipboardErrorNoPermission": "cobalt can't access the most recent item in your clipboard without your permission.\n\nif you don't want to give access, just paste the link manually instead.\n\nif you do, go to site settings and enable the clipboard permission.",
|
||||
"SupportSelfTroubleshooting": "experiencing issues? try <a class=\"text-backdrop link\" href=\"{repo}/wiki/Troubleshooting\" target=\"_blank\">self-troubleshooting guide</a> first!",
|
||||
"SupportSelfTroubleshooting": "experiencing issues? try <a class=\"text-backdrop link\" href=\"{repo}/blob/current/docs/troubleshooting.md\" target=\"_blank\">self-troubleshooting guide</a> first!",
|
||||
"AccessibilityGoBack": "go back and close the popup",
|
||||
"CollapseKeyboard": "keyboard shortcuts",
|
||||
"KeyboardShortcutsIntro": "use cobalt even faster with keyboard shortcuts:",
|
||||
"KeyboardShortcutQuickPaste": "paste the link",
|
||||
"KeyboardShortcutClear": "clear link input area",
|
||||
"KeyboardShortcutClosePopup": "close all popups",
|
||||
"CollapseLegal": "legal stuff",
|
||||
"FairUse": "cobalt is a tool for easing content downloads from internet and takes <span class=\"text-backdrop\">zero liability</span>. you are responsible for what you download, how you use and distribute that content.\n\ncobalt does not log any info about you, it's impossible for me to snitch on you, but please be mindful when using content of others and always credit original creators!\n\nwhen used in education purposes (lecture, homework, etc) please attach the source link.\n\nfair use and credits benefit everyone.",
|
||||
"CollapseLegal": "terms and ethics",
|
||||
"FairUse": "cobalt is a tool for easing content downloads from internet and takes <span class=\"text-backdrop\">zero liability</span>. you are responsible for what you download, how you use and distribute that content. please be mindful when using content of others and always credit original creators.\n\nwhen used in education purposes (lecture, homework, etc) please attach the source link.\n\nfair use and credits benefit everyone.",
|
||||
"UrgentFeatureUpdate71": "more supported services!",
|
||||
"UrgentThanks": "thank you for support!",
|
||||
"SettingsDisableMetadata": "don't add metadata",
|
||||
|
|
|
@ -126,17 +126,17 @@
|
|||
"SettingsReduceTransparency": "уменьшить прозрачность",
|
||||
"SettingsDisableAnimations": "убрать анимации",
|
||||
"FeatureErrorGeneric": "твой браузер не разрешает или не поддерживает эту функцию. проверь наличие обновлений и попробуй ещё раз!",
|
||||
"ClipboardErrorFirefox": "ты используешь firefox в котором все функции чтения из буфера обмена отключены по умолчанию.\n\nно это можно исправить следуя шагам, описанным <a class=\"text-backdrop link\" href=\"{repo}/wiki/Troubleshooting#how-to-fix-clipboard-pasting-in-firefox\" target=\"_blank\">здесь</a>\n\n...или же ты можешь просто вставить ссылку вручную.",
|
||||
"ClipboardErrorFirefox": "ты используешь firefox в котором все функции чтения из буфера обмена отключены по умолчанию.\n\nно это можно исправить следуя шагам, описанным <a class=\"text-backdrop link\" href=\"{repo}/blob/current/docs/troubleshooting.md#how-to-fix-clipboard-pasting-in-firefox\" target=\"_blank\">здесь</a>\n\n...или же ты можешь просто вставить ссылку вручную.",
|
||||
"ClipboardErrorNoPermission": "кобальт не может прочитать последний элемент в буфере обмена без твоего разрешения.\n\nесли ты не хочешь давать доступ, просто вставь ссылку вручную.\n\nну а если хочешь, то открой настройки сайта и разреши доступ на чтение буфера обмена.",
|
||||
"SupportSelfTroubleshooting": "возникли проблемы? попробуй сначала исправить всё сам <a class=\"text-backdrop link\" href=\"{repo}/wiki/Troubleshooting\" target=\"_blank\">по этому гиду!</a>",
|
||||
"SupportSelfTroubleshooting": "возникли проблемы? попробуй сначала исправить всё сам <a class=\"text-backdrop link\" href=\"{repo}/blob/current/docs/troubleshooting.md\" target=\"_blank\">по этому гиду!</a>",
|
||||
"AccessibilityGoBack": "вернуться назад и закрыть окно",
|
||||
"CollapseKeyboard": "горячие клавиши",
|
||||
"KeyboardShortcutsIntro": "пользуйся кобальтом ещё быстрее с горячими клавишами:",
|
||||
"KeyboardShortcutQuickPaste": "вставить ссылку",
|
||||
"KeyboardShortcutClear": "очистить зону вставки ссылки",
|
||||
"KeyboardShortcutClosePopup": "закрыть все окна",
|
||||
"CollapseLegal": "правовые штучки",
|
||||
"FairUse": "кобальт - это инструмент для облегчения скачивания контента из интернета, и он <span class=\"text-backdrop\">не несёт никакой ответственности</span>. ты несёшь ответственность за то, что скачиваешь, как используешь и распространяешь скачанный контент.\n\nкобальт не собирает никакой информации о тебе, и не может донести на тебя, но, пожалуйста, будь сознателен при использовании чужого контента и всегда указывай авторов!\n\nпри использовании в образовательных целях (лекции, домашние задания и т.д.), пожалуйста, прикладывай ссылку на источник.\n\nчестное использование и указание авторства выгодно всем.",
|
||||
"CollapseLegal": "принципы и этика",
|
||||
"FairUse": "кобальт - это инструмент для облегчения скачивания контента из интернета, и он <span class=\"text-backdrop\">не несёт никакой ответственности</span>. ты несёшь ответственность за то, что скачиваешь, как используешь и распространяешь скачанный контент. пожалуйста, будь сознателен при использовании чужого контента и всегда указывай авторов!\n\nпри использовании в образовательных целях (лекции, домашние задания и т.д.), пожалуйста, прикладывай ссылку на источник.\n\nчестное использование и указание авторства выгодно всем.",
|
||||
"UrgentFeatureUpdate71": "расширение поддержки сервисов!",
|
||||
"UrgentThanks": "спасибо за поддержку!",
|
||||
"SettingsDisableMetadata": "не добавлять метаданные",
|
||||
|
|
|
@ -274,3 +274,7 @@ export function sponsoredList() {
|
|||
}
|
||||
return `<div id="sponsored-logos" aria-label="${altText.slice(0, -2)}">${base}</div>`
|
||||
}
|
||||
|
||||
export function betaTag() {
|
||||
return process.env.isBeta ? '<span class="logo-sub">β</span>' : ''
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { checkbox, collapsibleList, explanation, footerButtons, multiPagePopup, popup, popupWithBottomButtons, sep, settingsCategory, switcher, socialLink, socialLinks, urgentNotice, keyboardShortcuts, webLoc, sponsoredList } from "./elements.js";
|
||||
import { checkbox, collapsibleList, explanation, footerButtons, multiPagePopup, popup, popupWithBottomButtons, sep, settingsCategory, switcher, socialLink, socialLinks, urgentNotice, keyboardShortcuts, webLoc, sponsoredList, betaTag } from "./elements.js";
|
||||
import { services as s, authorInfo, version, repo, donations, supportedAudio } from "../config.js";
|
||||
import { getCommitInfo } from "../sub/currentCommit.js";
|
||||
import loc from "../../localization/manager.js";
|
||||
|
@ -568,7 +568,7 @@ export default function(obj) {
|
|||
action: "popup('about', 1, 'changelog')"
|
||||
})}
|
||||
<div id="cobalt-main-box" class="center">
|
||||
<div id="logo">${t("AppTitleCobalt")}</div>
|
||||
<div id="logo">${t("AppTitleCobalt")}${betaTag()}</div>
|
||||
<div id="download-area">
|
||||
<div id="top">
|
||||
<input id="url-input-area" class="mono" type="text" autocorrect="off" maxlength="128" autocapitalize="off" placeholder="${t('LinkInput')}" aria-label="${t('AccessibilityInputArea')}" oninput="button()"></input>
|
||||
|
|
Loading…
Reference in a new issue