Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "feat: add hypertrons tab" #209

Merged
merged 1 commit into from
Aug 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hypertrons-crx",
"version": "1.1.0",
"name": "hypercrx",
"version": "1.0.2",
"private": true,
"description": "Hypertrons Chromium Extension",
"license": "Apache",
Expand All @@ -22,7 +22,6 @@
"@types/chrome": "0.0.104",
"@types/react": "^17.0.2",
"copy-to-clipboard": "^3.3.1",
"delegated-events": "^1.1.2",
"echarts": "^5.0.2",
"github-url-detection": "^4.10.0",
"jquery": "^3.6.0",
Expand Down
4 changes: 2 additions & 2 deletions src/api/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export const getConfigFromGithub = async (owner: string, repo: string) => {
const response = await octokit.request('GET /repos/{owner}/{repo}/contents/.github/hypertrons.json', { owner, repo });
const res = response.data as any;
res.content = Buffer.from(res.content, 'base64').toString('ascii');
return JSON.parse(res.content);
return JSON.parse(res.content)["hypertrons-crx"];
} catch (error: unknown) {
return {};
}
}
}
48 changes: 0 additions & 48 deletions src/components/Graph/Radar.tsx

This file was deleted.

24 changes: 0 additions & 24 deletions src/locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"golbal_loading": {
"message": "Loading……"
},
"golbal_link": {
"message": "Link"
},
"global_error_message": {
"message": "Sorry,an error occurred while loading Hypertrons-crx extention. Error Code is: "
},
Expand Down Expand Up @@ -143,18 +140,6 @@
"component_activeDeveloperCollabrationNetwork_description_edge": {
"message": "Edge: Collaborative relationship between developers, the value indicates the closeness of the connection between developers."
},
"component_projectDimensionIndex_title": {
"message": "Project Dimension Index"
},
"component_projectDimensionIndex_description": {
"message": "Project Dimension Index shows how do these fields change comparing the last time."
},
"component_projectDimensionIndex_description_sub1": {
"message": ""
},
"component_projectDimensionIndex_description_sub2": {
"message": ""
},
"component_darkMode": {
"message": "Dark mode"
},
Expand Down Expand Up @@ -259,14 +244,5 @@
},
"options_about_description_website": {
"message": "Welcome to visit out website to get more infomation:"
},
"hypertrons_tab_title": {
"message": "Hypertrons Commands"
},
"hypertrons_tab_description": {
"message": "You can use hypertrons commands here. See usage:"
},
"hypertrons_tab_link": {
"message": "https://www.hypertrons.io/#/component/index"
}
}
24 changes: 0 additions & 24 deletions src/locales/zh_CN/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"golbal_loading": {
"message": "载入中......"
},
"golbal_link": {
"message": "链接"
},
"global_error_message": {
"message": "抱歉,Hypertrons-crx 插件加载时遇到了一点问题。错误代码为:"
},
Expand Down Expand Up @@ -143,18 +140,6 @@
"component_activeDeveloperCollabrationNetwork_description_edge": {
"message": "边:开发者与开发者之间的连接关系,值的大小表示开发者间联系的紧密程度。"
},
"component_projectDimensionIndex_title": {
"message": "项目维度指标图"
},
"component_projectDimensionIndex_description": {
"message": "项目维度指标图展现了项目相对于上一周期各维度的变化。"
},
"component_projectDimensionIndex_description_sub1": {
"message": ""
},
"component_projectDimensionIndex_description_sub2": {
"message": ""
},
"component_darkMode": {
"message": "深色模式"
},
Expand Down Expand Up @@ -259,14 +244,5 @@
},
"options_about_description_website": {
"message": "欢迎访问我们的网站获取更多信息:"
},
"hypertrons_tab_title": {
"message": "Hypertrons 指令"
},
"hypertrons_tab_description": {
"message": "可在此处使用hypertrons指令,详情请见:"
},
"hypertrons_tab_link": {
"message": "https://www.hypertrons.io/#/zh-cn/component/index"
}
}
3 changes: 1 addition & 2 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
"*://github.com/*",
"storage",
"notifications",
"alarms",
"cookies"
"alarms"
],
"manifest_version": 2,
"content_security_policy": "script-src 'self'; object-src 'self'"
Expand Down
29 changes: 0 additions & 29 deletions src/mock/radar.data.ts

This file was deleted.

25 changes: 1 addition & 24 deletions src/pages/Background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,4 @@ chrome.notifications.onClicked.addListener(async function(notificationId){
break;
}
chrome.notifications.clear(notificationId);
});

chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
const type = request.task_type
if(type==="get_username_from_cookie"){
chrome.cookies.get({
url : "https://github.com",
name : "dotcom_user"
}, function(cookie) {
let message;
if(cookie){
message=cookie.value;
}
else{
message=null;
}
sendResponse({
message: message
});
});
}
// must return true in async mode
return true;
})
});
Loading