Skip to content

Commit

Permalink
Update 3.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
WenyanLiu committed Dec 16, 2020
1 parent 858013d commit e6714ad
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ Clone CCFrank to a directory.

## What's New

**Version 3.0.3**

> Dec 16, 2020
1. 放宽了 Google 学术的匹配条件,修复了由“发表年份”不匹配引起的错误。

**Version 3.0.2**

> Dec 16, 2020
Expand Down
10 changes: 4 additions & 6 deletions js/scholar.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ scholar.appendRank = function () {
.replace(/[\,\-\…]/g, "")
.split(" ");
let author = data[1];
let year = data.slice(-3)[0];
fetchRank(node, title, author, year);
fetchRank(node, title, author);
});
};

Expand All @@ -43,17 +42,16 @@ scholar.appendRanks = function () {
.text()
.replace(/[\,\…]/g, "")
.split(" ")[1];
let year = $(this).find("td.gsc_a_y").text();
fetchRank(node, title, author, year);
fetchRank(node, title, author);
}
});
};

function fetchRank(node, title, author, year) {
function fetchRank(node, title, author) {
var xhr = new XMLHttpRequest();
api_format =
"https://dblp.org/search/publ/api?q=" +
encodeURIComponent(title + " " + author + " year:" + year + ":") +
encodeURIComponent(title + " " + author) +
"&format=json";
xhr.open("GET", api_format, true);
xhr.onreadystatechange = function () {
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "__MSG_extName__",
"version": "3.0.2",
"version": "3.0.3",
"description": "__MSG_extDesc__",
"manifest_version": 2,
"default_locale": "en",
Expand Down

0 comments on commit e6714ad

Please sign in to comment.