Skip to content

Commit

Permalink
Use cached Youdao result in all the places
Browse files Browse the repository at this point in the history
  • Loading branch information
xhacker committed Mar 21, 2016
1 parent 9bf4893 commit 49b87fc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ function show_def(word) {
$("#extradef .content").html("<p>loading...</p>");

$.ajax({
url: "http://halo.xhacker.im/youdao/query/" + word,
url: youdao_url + word,
dataType: "json",
success: function(data) {
var def = "", i;
Expand Down
6 changes: 1 addition & 5 deletions include/common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
const YOUDAO_API_KEYFROM = "HaloWordDictionary";
const YOUDAO_API_KEY = "1311342268";
var youdao_url = "https://fanyi.youdao.com/fanyiapi.do?keyfrom=" + YOUDAO_API_KEYFROM + "&key=" + YOUDAO_API_KEY + "&type=data&doctype=json&version=1.1&q=";

const WEBSTER_KEY = "6d9366e8-dc95-4b44-931a-ff90bc8f96bd"
var youdao_url = "http://halo.xhacker.im/youdao/query/";
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Halo Word Dictionary",
"short_name": "Halo Word",
"version": "0.6.6",
"version": "0.6.7",
"manifest_version": 2,

"description": "精巧易用的英汉字典,界面简洁舒适。包含单词表、划词查询、右键查询等功能。Enjoy!",
Expand Down

2 comments on commit 49b87fc

@qlxiao520
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

您好,反馈一个问题,今天使用0.6.7版本, 提示:中文释义载入失败,请联系开发者。
检查API地址发现有道返回出错信息:来自您key的翻译API请求异常频繁,为保护其他用户的正常访问,只能暂时禁止您目前key的访问。

再次感谢您开发出了好用的词典

@xhacker
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qlxiao520: 您好,现在应该已经修复了,麻烦您确认一下。

Please sign in to comment.