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显示样式 #489

Merged
merged 6 commits into from
Nov 11, 2015
Merged

Conversation

iblogc
Copy link
Contributor

@iblogc iblogc commented Nov 6, 2015

修改多说评论UA显示样式
修复在设置了duoshuo_info.user_id但没有设置duoshuo_info.admin_nickname时,不显示默认的admin_nickname问题

圆形头像请忽略,这是多说后台设置的,主题里默认的还是方形头像

新样式(黑白主题配黑白样式:smile:)

2

老样式

1

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;';

//return '<span class="this_ua platform '+sua.os.name+'">'+osIco+sua.os.name+' '+sua.os.version+'</span><span class="this_ua browser '+sua.browser.name+'"><i class="fa fa-globe"></i>&nbsp;'+sua.browser.name+'|'+sua.browser.version+'</span>';

Choose a reason for hiding this comment

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

Line is too long.
Too many errors. (97% scanned).

}
function hookDUOSHUO_tp() {
var _D_post = DUOSHUO.templates.post
DUOSHUO.templates.post = function (e, t) {

Choose a reason for hiding this comment

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

'DUOSHUO' is not defined.

if (isiPad) {
return false;
}
var isMobile = navigator.userAgent.match(/iphone|android|phone|mobile|wap|netfront|x11|java|opera mobi|opera mini|ucweb|windows ce|symbian|symbianos|series|webos|sony|blackberry|dopod|nokia|samsung|palmsource|xda|pieplus|meizu|midp|cldc|motorola|foma|docomo|up.browser|up.link|blazer|helio|hosin|huawei|novarra|coolpad|webos|techfaith|palmsource|alcatel|amoi|ktouch|nexian|ericsson|philips|sagem|wellcom|bunjalloo|maui|smartphone|iemobile|spice|bird|zte-|longcos|pantech|gionee|portalmmm|jig browser|hiptop|benq|haier|^lct|320x320|240x320|176x220/i) != null;

Choose a reason for hiding this comment

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

Line is too long.
Use '!==' to compare with 'null'.

@iblogc
Copy link
Contributor Author

iblogc commented Nov 6, 2015

@iissnan 话说这个代码格式检查应该是个机器人吧,怎么添加的?以前从来没见过

iissnan added a commit that referenced this pull request Nov 11, 2015
修改多说评论UA显示样式
@iissnan iissnan merged commit e1380dc into iissnan:master Nov 11, 2015
@iissnan
Copy link
Owner

iissnan commented Nov 11, 2015

Nice! Thanks

@iblogc
Copy link
Contributor Author

iblogc commented Nov 12, 2015

@iissnan 这个代码格式自动检查的机器人是怎么回事,很是好奇啊:bowtie:

@mpc2008cn
Copy link

这两天ios firefox出了,请在UA里添加对它的支持,谢谢
目前显示的"Safari|undefined"
http://mpc2008cn.github.io/about/

@iblogc
Copy link
Contributor Author

iblogc commented Nov 13, 2015

@mpc2008cn 请用ios的firefox打开http://faisalman.github.io/ua-parser-js/ 看下显示的UA信息是否正常,如果也是undefined那就要等ua-parser-js更新了。

@mpc2008cn
Copy link

ua-ios-ff
@korvin101 还是显示的safari

@iblogc
Copy link
Contributor Author

iblogc commented Nov 15, 2015

@mpc2008cn 已修复,效果见http://me.iblogc.com/2015/11/15/duoshuo-comments-ua/
已发pr,等作者合并#507

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants