Skip to content
New issue

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

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

Already on GitHub? # to your account

多说评论UA新增Wechat浏览器 QQ浏览器和IOS Firefox显示 #507

Merged
merged 1 commit into from
Nov 16, 2015
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
4 changes: 3 additions & 1 deletion source/js/hook-duoshuo.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function showUa(string) {
var browserName = sua.browser.name;
if (checkMobile()) br = '<br><br>';

if (osName == 'Android') osIco = '<i class="fa fa-android"></i>&nbsp;';
if (osName.match(/Android/i)) osIco = '<i class="fa fa-android"></i>&nbsp;';

Choose a reason for hiding this comment

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

Expected '{' and instead saw 'osIco'.

if (osName.match(/linux/i)) osIco = '<i class="fa fa-linux"></i>&nbsp;';
if (osName.match(/mac os|ios/i)) osIco = '<i class="fa fa-apple"></i>&nbsp;';
if (sua.os.version == 'x86_64') sua.os.version = 'x64';
Expand All @@ -57,6 +57,8 @@ function showUa(string) {
if (browserName.match(/opera/i)) browserIco = '<i class="fa fa-opera"></i>&nbsp;';
if (browserName.match(/safari/i)) browserIco = '<i class="fa fa-safari"></i>&nbsp;';
if (browserName.match(/ie/i)) browserIco = '<i class="fa fa-internet-explorer"></i>&nbsp;';
if (browserName.match(/WeChat/i)) browserIco = '<i class="fa fa-wechat"></i>&nbsp;';

Choose a reason for hiding this comment

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

Line is too long.
Expected '{' and instead saw 'browserIco'.

if (browserName.match(/QQBrowser/i)) browserIco = '<i class="fa fa-qq"></i>&nbsp;';

Choose a reason for hiding this comment

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

Line is too long.
Expected '{' and instead saw 'browserIco'.


return br + '<span class="platform ' + sua.os.name + '">' + osIco +
sua.os.name + ' ' + sua.os.version + '</span>' + br +
Expand Down
Loading