Skip to content

Commit

Permalink
Merge pull request #23 from zhuowenli/b_fixed_language
Browse files Browse the repository at this point in the history
🐛 fixed #22, languages search issues.
  • Loading branch information
zhuowenli authored Sep 3, 2018
2 parents c27f2f1 + 8d7b387 commit cd5c759
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 42 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "githuber",
"version": "1.2.1",
"version": "1.2.2",
"main": "index.js",
"repository": "[email protected]:zhuowenli/githuber.git",
"author": "卓文理 <[email protected]>",
Expand Down
58 changes: 19 additions & 39 deletions src/services/languages.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const languages = [
color: '#5a6986',
},
{
name: 'Objective-C++',
name: 'Objective C++',
value: 'Objective-C++',
color: '#6866fb',
},
Expand All @@ -39,7 +39,7 @@ const languages = [
},
{
name: 'Jupyter Notebook',
value: 'Jupyter-Notebook',
value: 'Jupyter Notebook',
color: '#DA5B0B',
},
{
Expand Down Expand Up @@ -69,7 +69,7 @@ const languages = [
},
{
name: 'Web Ontology Language',
value: 'Web-Ontology-Language',
value: 'Web Ontology Language',
color: '#9cc9dd',
},
{
Expand Down Expand Up @@ -143,15 +143,10 @@ const languages = [
color: '#776791',
},
{
name: 'Objective-C',
name: 'Objective C',
value: 'Objective-C',
color: '#438eff',
},
{
name: 'ColdFusion CFC',
value: 'ColdFusion-CFC',
color: '#ed2cd6',
},
{
name: 'Oz',
value: 'Oz',
Expand All @@ -163,7 +158,7 @@ const languages = [
color: '#c7a938',
},
{
name: 'Objective-J',
name: 'Objective J',
value: 'Objective-J',
color: '#ff0c5a',
},
Expand All @@ -179,7 +174,7 @@ const languages = [
},
{
name: 'Component Pascal',
value: 'Component-Pascal',
value: 'Component Pascal',
color: '#b0ce4e',
},
{
Expand Down Expand Up @@ -209,7 +204,7 @@ const languages = [
},
{
name: 'Visual Basic',
value: 'Visual-Basic',
value: 'Visual Basic',
color: '#945db7',
},
{
Expand Down Expand Up @@ -289,7 +284,7 @@ const languages = [
},
{
name: 'Pure Data',
value: 'Pure-Data',
value: 'Pure Data',
color: '#91de79',
},
{
Expand Down Expand Up @@ -334,7 +329,7 @@ const languages = [
},
{
name: 'API Blueprint',
value: 'API-Blueprint',
value: 'API Blueprint',
color: '#2ACCA8',
},
{
Expand Down Expand Up @@ -459,7 +454,7 @@ const languages = [
},
{
name: 'Propeller Spin',
value: 'Propeller-Spin',
value: 'Propeller Spin',
color: '#7fa2a7',
},
{
Expand All @@ -482,11 +477,6 @@ const languages = [
value: 'Ada',
color: '#02f88c',
},
{
name: 'Unity3D Asset',
value: 'Unity3D-Asset',
color: '#ab69a1',
},
{
name: 'Nu',
value: 'Nu',
Expand Down Expand Up @@ -562,19 +552,14 @@ const languages = [
value: 'NetLogo',
color: '#ff6375',
},
{
name: 'C Sharp',
value: 'C-Sharp',
color: '#178600',
},
{
name: 'C#',
value: 'C#',
color: '#178600',
},
{
name: 'Emacs Lisp',
value: 'Emacs-Lisp',
value: 'Emacs Lisp',
color: '#c065db',
},
{
Expand Down Expand Up @@ -649,7 +634,7 @@ const languages = [
},
{
name: 'Unified Parallel C',
value: 'Unified-Parallel-C',
value: 'Unified Parallel C',
color: '#4e3617',
},
{
Expand Down Expand Up @@ -699,7 +684,7 @@ const languages = [
},
{
name: 'Ragel in Ruby Host',
value: 'Ragel-in-Ruby-Host',
value: 'Ragel in Ruby Host',
color: '#9d5200',
},
{
Expand Down Expand Up @@ -809,7 +794,7 @@ const languages = [
},
{
name: 'Common Lisp',
value: 'Common-Lisp',
value: 'Common Lisp',
color: '#3fb68b',
},
{
Expand Down Expand Up @@ -869,24 +854,19 @@ const languages = [
},
{
name: 'Grammatical Framework',
value: 'Grammatical-Framework',
value: 'Grammatical Framework',
color: '#79aa7a',
},
{
name: 'Game Maker Language',
value: 'Game-Maker-Language',
value: 'Game Maker Language',
color: '#8fb200',
},
{
name: 'Papyrus',
value: 'Papyrus',
color: '#6600cc',
},
{
name: 'NetLinx+ERB',
value: 'NetLinx+ERB',
color: '#747faa',
},
{
name: 'Clean',
value: 'Clean',
Expand Down Expand Up @@ -914,7 +894,7 @@ const languages = [
},
{
name: 'Standard ML',
value: 'Standard-ML',
value: 'Standard ML',
color: '#dc566d',
},
{
Expand Down Expand Up @@ -959,7 +939,7 @@ const languages = [
},
{
name: 'AGS Script',
value: 'AGS-Script',
value: 'AGS Script',
color: '#B9D9FF',
},
{
Expand All @@ -982,7 +962,7 @@ const languages = [
const nameB = b.name.toUpperCase();

if (nameA < nameB) {
return -1;
return 1;
}
if (nameA > nameB) {
return 1;
Expand Down
2 changes: 1 addition & 1 deletion src/vuex/modules/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const actions = {
}

// 访问页面
data = await get(`https://github.com/trending/${lang}`, { since });
data = await get(`https://github.com/trending/${encodeURIComponent(lang)}`, { since });

const $ = cheerio.load(data);
const repos = [];
Expand Down
2 changes: 1 addition & 1 deletion static/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "GITHUBER - 开发者的新标签页",
"description": "这是一个帮助 GitHub 开发者每日发现优质内容的 Chrome 主页拓展。",
"version": "1.2.1",
"version": "1.2.2",
"icons": {
"16": "assets/icon/icon-16.png",
"48": "assets/icon/icon-48.png",
Expand Down

0 comments on commit cd5c759

Please sign in to comment.