Skip to content

Commit

Permalink
v0.3🚩
Browse files Browse the repository at this point in the history
1. 增加对file://协议本地文件的支持。

Merge branch 'developer'
  • Loading branch information
jinliming2 committed Apr 17, 2017
2 parents 7bf7253 + da8d622 commit 8455fe6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ A Google Chrome extension used to modify the page default encoding for Google Ch

## History
### v0.3(2017/4/17)
1. 增加对file://协议本地文件的支持。

### v0.2(2017/3/22)
1. 修改编码列表加载逻辑。
Expand Down
3 changes: 3 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"message": "Modify the default encoding for the website",
"description": "Extension: Short Name"
},
"cannotLoadLocalFile": {
"message": "Charset extension cannot load file:// protocol files!\nPlease check the \"Allow access to file URLs\" option in Chrome menu > More tools > Extensions."
},
"btnReset": {
"message": "Reset",
"description": "Reset default charset"
Expand Down
3 changes: 3 additions & 0 deletions _locales/zh_CN/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"message": "修改网站的默认编码",
"description": "Extension: Short Name"
},
"cannotLoadLocalFile": {
"message": "Charset扩展程序无法读取file://协议文件!\n请在扩展设置页面勾选“允许访问文件网址”选项!\"123\""
},
"btnReset": {
"message": "复位",
"description": "Reset default charset"
Expand Down
2 changes: 1 addition & 1 deletion j/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
});
};
xmlHttp.onerror = () => {
console.error('Charset扩展程序无法读取file://协议文件,请在扩展设置页面勾选“允许访问文件网址”选项!');
alert(chrome.i18n.getMessage('cannotLoadLocalFile'));
};
xmlHttp.open('GET', tab.url, true);
xmlHttp.send();
Expand Down

0 comments on commit 8455fe6

Please sign in to comment.