feat(extension): 添加时间戳转换和复制功能

- 新增时间戳与日期互相转换功能
- 实现带反馈的文本复制组件
- 添加时间戳实时更新与控制按钮
- 配置ESLint规则支持React和Web Extensions
- 注册background script处理复制权限
- 更新manifest.json配置文件
- 优化CSS样式支持新功能界面
- 移除用户列表页面相关路由和导入
- 添加输入框和选择器样式
- 实现日期格式化工具函数
This commit is contained in:
雨霖铃
2025-12-18 22:54:16 +08:00
parent 519e53851d
commit e19dff6f79
7 changed files with 295 additions and 106 deletions
+8
View File
@@ -0,0 +1,8 @@
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
if (request.action === 'start') {
navigator.clipboard.writeText(request.text)
.then(() => sendResponse({success: true}))
.catch((err) => console.log(err));
return true;
}
});
+20 -15
View File
@@ -1,19 +1,24 @@
{
"manifest_version": 3,
"name": "React Router Chrome Extension",
"version": "1.0",
"description": "A Chrome Extension with React Router: User List + Actions Pages",
"permissions": ["storage"],
"icons": {
"16": "favicon.ico",
{
"manifest_version": 3,
"name": "React Router Chrome Extension",
"version": "1.0",
"description": "A Chrome Extension with React Router: User List + Actions Pages",
"permissions": [
"storage"
],
"background": {
"service_worker": "background.js"
},
"icons": {
"16": "favicon.ico",
"48": "favicon.ico",
"128": "favicon.ico"
},
"action": {
"default_popup": "index.html"
},
"options_ui": {
"page": "index.html",
"open_in_tab": true
}
"action": {
"default_popup": "index.html"
},
"options_ui": {
"page": "index.html",
"open_in_tab": true
}
}