Skip to content

Commit

Permalink
Merge pull request #97 from VampireChicken12/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
VampireChicken12 authored Nov 15, 2023
2 parents fff4969 + f4c6bcf commit d3bd410
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 103 deletions.
18 changes: 7 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
## [1.11.6](https://github.com/VampireChicken12/youtube-enhancer/compare/v1.11.5...v1.11.6) (2023-11-15)


### Bug Fixes

* remaining time not removed ([35d9e4a](https://github.com/VampireChicken12/youtube-enhancer/commit/35d9e4a0c8e3dca489e92f1a4017fb1b56440d35))




- remaining time not removed ([35d9e4a](https://github.com/VampireChicken12/youtube-enhancer/commit/35d9e4a0c8e3dca489e92f1a4017fb1b56440d35))

## Release Artifacts
| File Name | SHA-256 Hash |
| :--- | :---: |
| youtube-enhancer-v1.11.6-Chrome.zip | 35404730152a7ddb08fc5cb37b970716a7daaa9f9b0d911159ee22bd24a45a88 |

| File Name | SHA-256 Hash |
| :------------------------------------ | :--------------------------------------------------------------: |
| youtube-enhancer-v1.11.6-Chrome.zip | 35404730152a7ddb08fc5cb37b970716a7daaa9f9b0d911159ee22bd24a45a88 |
| youtube-enhancer-v1.11.6-Chromium.zip | e010032db390df6c22aae6bf38b63d7f88bf4a42bb39bb8a7bdd4f51a4465b66 |
| youtube-enhancer-v1.11.6-Edge.zip | e010032db390df6c22aae6bf38b63d7f88bf4a42bb39bb8a7bdd4f51a4465b66 |
| youtube-enhancer-v1.11.6-Firefox.zip | ff343d066be91dbff89504c8696c424bcc29a28c4997f2c7b93f49fea89be936 |
| youtube-enhancer-v1.11.6-Edge.zip | e010032db390df6c22aae6bf38b63d7f88bf4a42bb39bb8a7bdd4f51a4465b66 |
| youtube-enhancer-v1.11.6-Firefox.zip | ff343d066be91dbff89504c8696c424bcc29a28c4997f2c7b93f49fea89be936 |

## [1.11.5](https://github.com/VampireChicken12/youtube-enhancer/compare/v1.11.4...v1.11.5) (2023-11-14)

Expand Down
148 changes: 74 additions & 74 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,75 +1,75 @@
{
"name": "youtube-enhancer",
"author": {
"name": "VampireChicken12"
},
"displayName": "YouTube Enhancer",
"version": "1.11.6",
"description": "YouTube Enhancer is a simple extension that adds some useful features to YouTube.",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/VampireChicken12/youtube-enhancer.git"
},
"scripts": {
"build": "vite build",
"dev": "nodemon",
"format": "prettier --write .",
"lint": "eslint --fix"
},
"type": "module",
"dependencies": {
"@formkit/auto-animate": "^0.8.1",
"i18next": "^23.7.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"vite-plugin-css-injected-by-js": "^3.3.0",
"webextension-polyfill": "^0.10.0"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@thedutchcoder/postcss-rem-to-px": "^0.0.2",
"@total-typescript/ts-reset": "^0.5.1",
"@types/archiver": "^6.0.1",
"@types/chrome": "^0.0.251",
"@types/node": "^20.9.0",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@types/webextension-polyfill": "^0.10.6",
"@types/youtube-player": "^5.5.10",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"@vitejs/plugin-react-swc": "^3.4.1",
"archiver": "^6.0.1",
"autoprefixer": "^10.4.16",
"clsx": "^2.0.0",
"concurrently": "^8.2.2",
"eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-no-secrets": "^0.8.9",
"eslint-plugin-perfectionist": "^2.3.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-tailwindcss": "^3.13.0",
"fs-extra": "^11.1.1",
"get-installed-browsers": "^0.1.7",
"nodemon": "^3.0.1",
"postcss": "^8.4.31",
"prettier": "^3.0.3",
"semantic-release": "^22.0.7",
"tailwind-merge": "^2.0.0",
"tailwindcss": "^3.3.5",
"ts-json-as-const": "^1.0.7",
"ts-node": "^10.9.1",
"typescript": "^5.2.2",
"vite": "^4.5.0",
"zod": "^3.22.4",
"zod-error": "^1.5.0"
}
}
"name": "youtube-enhancer",
"author": {
"name": "VampireChicken12"
},
"displayName": "YouTube Enhancer",
"version": "1.11.6",
"description": "YouTube Enhancer is a simple extension that adds some useful features to YouTube.",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/VampireChicken12/youtube-enhancer.git"
},
"scripts": {
"build": "vite build",
"dev": "nodemon",
"format": "prettier --write .",
"lint": "eslint --fix"
},
"type": "module",
"dependencies": {
"@formkit/auto-animate": "^0.8.1",
"i18next": "^23.7.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"vite-plugin-css-injected-by-js": "^3.3.0",
"webextension-polyfill": "^0.10.0"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@thedutchcoder/postcss-rem-to-px": "^0.0.2",
"@total-typescript/ts-reset": "^0.5.1",
"@types/archiver": "^6.0.1",
"@types/chrome": "^0.0.251",
"@types/node": "^20.9.0",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@types/webextension-polyfill": "^0.10.6",
"@types/youtube-player": "^5.5.10",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"@vitejs/plugin-react-swc": "^3.4.1",
"archiver": "^6.0.1",
"autoprefixer": "^10.4.16",
"clsx": "^2.0.0",
"concurrently": "^8.2.2",
"eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-no-secrets": "^0.8.9",
"eslint-plugin-perfectionist": "^2.3.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-tailwindcss": "^3.13.0",
"fs-extra": "^11.1.1",
"get-installed-browsers": "^0.1.7",
"nodemon": "^3.0.1",
"postcss": "^8.4.31",
"prettier": "^3.0.3",
"semantic-release": "^22.0.7",
"tailwind-merge": "^2.0.0",
"tailwindcss": "^3.3.5",
"ts-json-as-const": "^1.0.7",
"ts-node": "^10.9.1",
"typescript": "^5.2.2",
"vite": "^4.5.0",
"zod": "^3.22.4",
"zod-error": "^1.5.0"
}
}
4 changes: 2 additions & 2 deletions src/features/playerQuality/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export default async function setPlayerQuality(): Promise<void> {
const playerContainer = isWatchPage()
? (document.querySelector("div#movie_player") as YouTubePlayerDiv | null)
: isShortsPage()
? (document.querySelector("div#shorts-player") as YouTubePlayerDiv | null)
: null;
? (document.querySelector("div#shorts-player") as YouTubePlayerDiv | null)
: null;

// If player element is not available, return
if (!playerContainer) return;
Expand Down
8 changes: 4 additions & 4 deletions src/features/playerSpeed/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export async function setPlayerSpeed(input?: number): Promise<void> {
const playerContainer = isWatchPage()
? (document.querySelector("div#movie_player") as YouTubePlayerDiv | null)
: isShortsPage()
? (document.querySelector("div#shorts-player") as YouTubePlayerDiv | null)
: null;
? (document.querySelector("div#shorts-player") as YouTubePlayerDiv | null)
: null;
// If player element is not available, return
if (!playerContainer) return;
const video = document.querySelector("video.html5-main-video") as HTMLVideoElement | null;
Expand Down Expand Up @@ -70,8 +70,8 @@ export function restorePlayerSpeed() {
const playerContainer = isWatchPage()
? (document.querySelector("div#movie_player") as YouTubePlayerDiv | null)
: isShortsPage()
? (document.querySelector("div#shorts-player") as YouTubePlayerDiv | null)
: null;
? (document.querySelector("div#shorts-player") as YouTubePlayerDiv | null)
: null;
const video = document.querySelector("video.html5-main-video") as HTMLVideoElement | null;
// If player element is not available, return
if (!playerContainer) return;
Expand Down
2 changes: 2 additions & 0 deletions src/features/remainingTime/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ export async function setupRemainingTime() {
const playerVideoData = await playerContainer.getVideoData();
const remainingTime = await calculateRemainingTime({ playerContainer, videoElement });
const remainingTimeElementExists = document.querySelector("span#ytp-time-remaining") !== null;
if (playerVideoData.isLive && !remainingTimeElementExists) return;

const remainingTimeElement = document.querySelector("span#ytp-time-remaining") ?? document.createElement("span");
// If the video is live return
if (playerVideoData.isLive && remainingTimeElementExists) {
Expand Down
4 changes: 2 additions & 2 deletions src/features/rememberVolume/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export default async function enableRememberVolume(): Promise<void> {
const playerContainer = IsWatchPage
? (document.querySelector("div#movie_player") as YouTubePlayerDiv | null)
: IsShortsPage
? (document.querySelector("div#shorts-player") as YouTubePlayerDiv | null)
: null;
? (document.querySelector("div#shorts-player") as YouTubePlayerDiv | null)
: null;

// If player container is not available, return
if (!playerContainer) return;
Expand Down
4 changes: 2 additions & 2 deletions src/features/rememberVolume/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export async function setupVolumeChangeListener() {
const playerContainer = IsWatchPage
? (document.querySelector("div#movie_player") as YouTubePlayerDiv | null)
: IsShortsPage
? (document.querySelector("div#shorts-player") as YouTubePlayerDiv | null)
: null;
? (document.querySelector("div#shorts-player") as YouTubePlayerDiv | null)
: null;
if (!playerContainer) return;
const videoElement: HTMLVideoElement | null = playerContainer.querySelector("div > video");
if (!videoElement) return;
Expand Down
4 changes: 2 additions & 2 deletions src/features/scrollWheelVolumeControl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export default async function adjustVolumeOnScrollWheel(): Promise<void> {
const playerContainer = isWatchPage()
? (document.querySelector("div#movie_player") as YouTubePlayerDiv | null)
: isShortsPage()
? (document.querySelector("div#shorts-player") as YouTubePlayerDiv | null)
: null;
? (document.querySelector("div#shorts-player") as YouTubePlayerDiv | null)
: null;
// If player element is not available, return
if (!playerContainer) return;

Expand Down
4 changes: 2 additions & 2 deletions src/features/scrollWheelVolumeControl/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export function adjustVolume(scrollDelta: number, volumeStep: number): Promise<{
const playerContainer = isWatchPage()
? (document.querySelector("div#movie_player") as YouTubePlayerDiv | null)
: isShortsPage()
? (document.querySelector("div#shorts-player") as YouTubePlayerDiv | null)
: null;
? (document.querySelector("div#shorts-player") as YouTubePlayerDiv | null)
: null;
if (!playerContainer) return;
if (!playerContainer.getVolume) return;
if (!playerContainer.setVolume) return;
Expand Down
8 changes: 4 additions & 4 deletions src/utils/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,10 @@ export function formatError(error: unknown) {
return error instanceof Error
? `\n${error.stack}\n\n${error.message}`
: error instanceof Object
? Object.hasOwnProperty.call(error, "toString") && typeof error.toString === "function"
? error.toString()
: "unknown error"
: "";
? Object.hasOwnProperty.call(error, "toString") && typeof error.toString === "function"
? error.toString()
: "unknown error"
: "";
}
/**
* Wait for all elements to appear in the document.
Expand Down

0 comments on commit d3bd410

Please sign in to comment.