Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bytedream committed Oct 8, 2023
0 parents commit 4b97857
Show file tree
Hide file tree
Showing 51 changed files with 9,757 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST_VERSION=2
8 changes: 8 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.DS_Store
node_modules
/dist
.env
.env.*
!.env.example

package-lock.json
33 changes: 33 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
'prettier'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
},
env: {
browser: true,
es2017: true,
node: true
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
],
rules: {
'@typescript-eslint/no-explicit-any': 'off'
}
};
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: ci

on:
push:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install nodejs
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- manifest_version: 2
- manifest_version: 3
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install nodejs
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build
env:
MANIFEST_VERSION: ${{ matrix.manifest_version }}
run: npm run build

- name: Upload
uses: actions/upload-artifact@v3
with:
name: enhance-crunchyroll-mv${{ matrix.manifest_version }}
path: ./dist
if-no-files-found: error
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/dist
**/node_modules
.DS_Store
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
auto-install-peers=false
strict-peer-dependencies=false
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.DS_Store
node_modules
/dist
.env
.env.*
!.env.example

package-lock.json
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
25 changes: 25 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Copyright (c) 2023-NOW Crunchy Labs Team

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
79 changes: 79 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Enhance Crunchyroll

A multi-browser extension to enhance your [Crunchyroll](https://www.crunchyroll.com) experience.

<p align="center">
<a href="https://github.com/crunchy-labs/enhance-crunchyroll/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/crunchy-labs/enhance-crunchyroll?style=flat-square" alt="License">
</a>
<a href="https://discord.gg/PXGPGpQxgk">
<img src="https://img.shields.io/discord/994882878125121596?label=discord&style=flat-square" alt="Discord">
</a>
<a href="https://github.com/crunchy-labs/enhance-crunchyroll/actions/workflows/ci.yml">
<img src="https://img.shields.io/github/actions/workflow/status/enhance-crunchyroll/enhance-crunchyroll/ci.yml?branch=master&style=flat-square" alt="CI">
</a>
</p>

> We are in no way affiliated with, maintained, authorized, sponsored, or officially associated with Crunchyroll LLC or any of its subsidiaries or affiliates.
> The official Crunchyroll website can be found at [www.crunchyroll.com](https://www.crunchyroll.com/).
## ✨ Features

- Download videos[^1][^2].
- Video player improvements
- No parallel stream limit.
- Default context menu when right-clicking the player.

[^1]: Due to browser restrictions the download is only available as [`.ts`](https://en.wikipedia.org/wiki/MPEG_transport_stream) file.
[^2]: On Firefox, the episode will be completely loaded into RAM before writing it to the disk which might cause some lagging. This is due to the lack of the (non-standardized) [`showSaveFilePicker`](https://developer.mozilla.org/en-US/docs/Web/API/Window/showSaveFilePicker) method.

## 📥 Installation

### Firefox

- Download `enhance-crunchyroll-<version>-mv2.zip` from the [latest release](https://github.com/crunchy-labs/enhance-crunchyroll/releases/latest) and unzip it
- Go into your browser and type `about:debugging#/runtime/this-firefox` in the address bar
- Click the `Load Temporary Add-on...` button and choose the `manifest.json` file in the unzipped directory

### Chromium / Google Chrome

> As nearly every browser other than Firefox is based on Chromium, this should be the same for most of them
- Download `enhance-crunchyroll-<version>-mv3.zip` from the [latest release](https://github.com/crunchy-labs/enhance-crunchyroll/releases/latest) and unzip it
- Go into your browser and type `chrome://extensions` in the address bar
- Turn on the developer mode by checking the switch in the top right corner
- Click `Load unpacked` and choose the unzipped directory

<details>
<summary>What is the difference between mv2 and mv3?</summary>
<p><code>mv</code> stands for <code>manifest version</code> and the number for its revision. Chrome / all Chromium based browsers are limiting support for MV2 extensions in favor of MV3, while Firefox still only has experimental support for MV3 and therefore works better with MV2.</p>
</details>

## 🛠 Development

_You need [nodejs](https://nodejs.org/en) and [npm](https://www.npmjs.com/) installed._

First you need to install the project dependencies.

```shell
$ npm install
```

Start the building/watch process which build the extension to the `dist/` directory and re-builds it on every change.

```shell
$ npm run watch
```

Start your desired browser and load the extension into it. You need to do this in a separate terminal session as the command from the step before is long-running.

```shell
# Start firefox and load the plugin into it
$ npm run serve:firefox
# Start chrome (or chromium) and load the plugin into it
$ npm run serve:chrome
```

## ⚖ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for more details.
Loading

0 comments on commit 4b97857

Please sign in to comment.