Skip to content

Commit

Permalink
chore: rm dev pannel
Browse files Browse the repository at this point in the history
  • Loading branch information
debugtheworldbot committed Mar 17, 2024
1 parent 2806e69 commit 9bc4bbc
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 74 deletions.
2 changes: 1 addition & 1 deletion src/pages/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
});

chrome.runtime.onInstalled.addListener(object => {
const externalUrl = 'https://www.danmucat.com';
const externalUrl = 'https://danmucat.com';

if (object.reason === chrome.runtime.OnInstalledReason.INSTALL) {
chrome.tabs.create({ url: externalUrl }, () => {
Expand Down
5 changes: 3 additions & 2 deletions src/pages/content/ui/SendDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import { useCallback, useEffect, useState, useRef } from 'react';
import { Rnd } from 'react-rnd';
import ControlPannel from './ControlPannel';

const isDev = true;
export const SendDashboard = (props: { onAdd: (text: string) => void }) => {
const config = useStorage(configStorage);
const { onAdd } = props;
const [visible, setVisible] = useState(true);
const [visible, setVisible] = useState(false);
const [text, setText] = useState('');
const focusing = useRef(false);
const inputRef = useRef(null);
Expand Down Expand Up @@ -52,7 +53,7 @@ export const SendDashboard = (props: { onAdd: (text: string) => void }) => {
const trackKey = (e: KeyboardEvent) => {
if (e.key === 'Enter') {
if (focusing.current) return console.log('ffffffocusing');
if (window.location.pathname !== '/watch') return console.log('not a watch page');
if (window.location.pathname !== '/watch' && !isDev) return console.log('not a watch page');
if (config.isLive) return console.log('live mode');
inputRef.current.focus();
setVisible(true);
Expand Down
13 changes: 0 additions & 13 deletions src/pages/devtools/index.html

This file was deleted.

5 changes: 0 additions & 5 deletions src/pages/devtools/index.ts

This file was deleted.

7 changes: 0 additions & 7 deletions src/pages/panel/Panel.css

This file was deleted.

12 changes: 0 additions & 12 deletions src/pages/panel/Panel.tsx

This file was deleted.

Empty file removed src/pages/panel/index.css
Empty file.
14 changes: 0 additions & 14 deletions src/pages/panel/index.html

This file was deleted.

18 changes: 0 additions & 18 deletions src/pages/panel/index.tsx

This file was deleted.

1 change: 1 addition & 0 deletions src/shared/storages/danmakuStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { BaseStorage, createStorage, StorageType } from '@src/shared/storages/ba
export type YT_Response = {
time?: number;
text: string;
displayText?: string;
}[];

type DanmakuStorage = BaseStorage<YT_Response> & {
Expand Down
2 changes: 0 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ export default defineConfig({
emptyOutDir: !isDev,
rollupOptions: {
input: {
devtools: resolve(pagesDir, 'devtools', 'index.html'),
panel: resolve(pagesDir, 'panel', 'index.html'),
contentInjected: resolve(pagesDir, 'content', 'injected', 'index.ts'),
contentUI: resolve(pagesDir, 'content', 'ui', 'index.ts'),
background: resolve(pagesDir, 'background', 'index.ts'),
Expand Down

0 comments on commit 9bc4bbc

Please sign in to comment.