Skip to content
프로젝트

소개

7TV 브라우저 확장 프로그램으로, Twitch, Kick, YouTube에 새로운 기능과 이모트, 꾸미기 요소, 성능 향상을 제공합니다.

생산성 및 자동화

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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.

관련 프로젝트 살펴보기

불러오는 중…