• Stars
    star
    389
  • Rank 110,500 (Top 3 %)
  • Language Vue
  • License
    Other
  • Created almost 4 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Web Extension for 7TV, bringing new features, emotes, vanity and performance to Twitch, Kick & YouTube

7TV Web Extension

Development

Building

  • make deps
  • make production

For a development/nightly (non-stable) build, set BRANCH=nightly in your environment variables.

Build output located in dist/.

Contributing

This extension is configured to work with HMR (Hot Module Replacement), which makes development significantly faster and more enjoyable than the traditional methods for making web extensions. This allows the developer to see changes reflect in real-time, even while on a remote website.

Working Locally

We use Vite as a primary tool for development and bundling.

Getting the extension to work locally is fast and easy, follow these steps:

  • Clone the repo: git clone [email protected]:SevenTV/Extension.git
  • Install dependencies: make deps
  • Run yarn start

The extension will now be compiled into its initial bundle, which may take up to twenty seconds. In dev mode, it is configured to connect to the vite server, which will start right after the bundle is complete.

The build files will be located in the dist/ folder: add this folder as an unpacked extension via the chrome extensions page.

Extension Loader

This repository is adapted as a BrowserExtension. It uses a manifest.json and the Extension API to run inside a browser.

The site-specific content and logic, however, runs as a Site Script, sectioned off by origin under src/sites. The Extension Content Script (src/content/content.ts) acts as a Loader for the site script, which is where the actual logic for modifying websites is located.

We do not use Isolated Worlds as we must access internal values from the website, which is not possible under an Extension Isolated World (content script).

Extension Background / Service Worker

The background script sets up some extension API-specific listeners for matters such as permissions. It also takes care of cross-site settings synchronization, by maintaining a copy of IndexedDB inside the Extension Context and re-distributing the updated config nodes to sites.

Site Script

Most of the logic inside the Extension runs under the Site Script, located under src/sites. Each folder there corresponds to an origin, such as twitch.tv or youtube.com. A module system exists to neatly section off features into their own space.

The site script works with HMR (Hot Module Replacement) and any changes to components within will hot-update accordingly, making UI building very efficient.

More Repositories

1

SevenTV

[WIP] Monorepo for 7TV
Svelte
51
star
2

API

The 7TV API | https://7tv.io/v3
Go
45
star
3

Website

The 7TV Web App with the Vue framework
TypeScript
36
star
4

ExtensionV3

This was a repo used to build the V3 of the Extension. Now moved back to https://github.com/seventv/extension
Vue
26
star
5

ServerGo

[deprecated] API Version 2 written in Go, succeeding the v1 Node API. It implements both GQL and REST APIs
Go
21
star
6

EventAPI

A service which provides live updates for various resources implementing the Server-Sent Events and WebSocket specs
Go
15
star
7

App

[deprecated] A web application with user interfaces for uploading emotes, managing channel emotes and more written with the Angular framework
TypeScript
11
star
8

ImageProcessor

Go
4
star
9

image-processor

The image processor which handles emote uploads
Go
4
star
10

AVIF-Encoder

AVIF (AV1 Image File Format) Encoder for 7TV emotes
Dockerfile
3
star
11

7tv-bot

Scalable chat bot providing services needed for 7TV
Go
3
star
12

Typings

Shared types for all SevenTV TypeScript Component
TypeScript
2
star
13

REST

Moved to https://github.com/SevenTV/API
Go
2
star
14

GQL

Moved to https://github.com/SevenTV/API
Go
2
star
15

WebsiteNext

ARCHIVED
Vue
2
star
16

message-queue

Go
1
star
17

Migrator

A utility used to convert 7TV data based on V2 to V3 scheme
Go
1
star
18

emotesearch

service that syncs mongodb emotes & meilisearch
HCL
1
star
19

k8s

Shell
1
star
20

protobuf

1
star
21

DockerFiles

Dockerfile
1
star
22

helm-manager

small cli tool to handle helm chart upgrades
Go
1
star
23

cloudflare-dns

Go
1
star
24

AutoDeploy

A application to auto deploy our other applications. It also auto deploys itself :)
Go
1
star
25

Server

Servicing and API for SevenTV features
TypeScript
1
star