Skip to content

Commit

Permalink
fix constants processing
Browse files Browse the repository at this point in the history
  • Loading branch information
GooseOb committed Dec 6, 2024
1 parent fb11054 commit 239a2eb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { BuildUserscriptConfig } from 'bun-build-userscript';
const define: Record<string, string> = {};

const raw = await readFile('src/constants.ts', 'utf8');
const pattern = /(\S+):\s*([^,;]+)/g;
const pattern = /([A-Z_0-9]+):\s*('[^']+'|[^,;]+)/g;

let tmp: RegExpExecArray | null;
while ((tmp = pattern.exec(raw))) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "yt-defaulter",
"author": "GooseOb",
"version": "1.11.0-alpha.16",
"version": "1.11.0-alpha.17",
"repository": {
"type": "git",
"url": "git+https://github.com/GooseOb/YT-Defaulter.git"
Expand Down
7 changes: 3 additions & 4 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// strings only
declare const STORAGE_NAME: 'YTDefaulter',
STORAGE_VERSION: 4,
SECTION_GLOBAL: 'global',
Expand All @@ -11,7 +12,5 @@ declare const STORAGE_NAME: 'YTDefaulter',
CUSTOM_SPEED: 'customSpeed',
QUALITY: 'quality',
VOLUME: 'volume',
SPEED_ICON_D =
'M10,8v8l6-4L10,8L10,8z M6.3,5L5.7,4.2C7.2,3,9,2.2,11,2l0.1,1C9.3,3.2,7.7,3.9,6.3,5z M5,6.3L4.2,5.7C3,7.2,2.2,9,2,11 l1,.1C3.2,9.3,3.9,7.7,5,6.3z M5,17.7c-1.1-1.4-1.8-3.1-2-4.8L2,13c0.2,2,1,3.8,2.2,5.4L5,17.7z M11.1,21c-1.8-0.2-3.4-0.9-4.8-2 l-0.6,.8C7.2,21,9,21.8,11,22L11.1,21z M22,12c0-5.2-3.9-9.4-9-10l-0.1,1c4.6,.5,8.1,4.3,8.1,9s-3.5,8.5-8.1,9l0.1,1 C18.2,21.5,22,17.2,22,12z',
QUALITY_ICON_D =
'M15,17h6v1h-6V17z M11,17H3v1h8v2h1v-2v-1v-2h-1V17z M14,8h1V6V5V3h-1v2H3v1h11V8z M18,5v1h3V5H18z M6,14h1v-2v-1V9H6v2H3v1 h3V14z M10,12h11v-1H10V12z';
SPEED_ICON_D: 'M10,8v8l6-4L10,8L10,8z M6.3,5L5.7,4.2C7.2,3,9,2.2,11,2l0.1,1C9.3,3.2,7.7,3.9,6.3,5z M5,6.3L4.2,5.7C3,7.2,2.2,9,2,11 l1,.1C3.2,9.3,3.9,7.7,5,6.3z M5,17.7c-1.1-1.4-1.8-3.1-2-4.8L2,13c0.2,2,1,3.8,2.2,5.4L5,17.7z M11.1,21c-1.8-0.2-3.4-0.9-4.8-2 l-0.6,.8C7.2,21,9,21.8,11,22L11.1,21z M22,12c0-5.2-3.9-9.4-9-10l-0.1,1c4.6,.5,8.1,4.3,8.1,9s-3.5,8.5-8.1,9l0.1,1 C18.2,21.5,22,17.2,22,12z',
QUALITY_ICON_D: 'M15,17h6v1h-6V17z M11,17H3v1h8v2h1v-2v-1v-2h-1V17z M14,8h1V6V5V3h-1v2H3v1h11V8z M18,5v1h3V5H18z M6,14h1v-2v-1V9H6v2H3v1 h3V14z M10,12h11v-1H10V12z';

0 comments on commit 239a2eb

Please sign in to comment.