Skip to content

Commit

Permalink
fix the compatibility for some mobile browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
DesertsPan committed Oct 20, 2017
1 parent ccc722d commit 1b3a892
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion dist/Valine.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/Valine.min.js.map

Large diffs are not rendered by default.

29 changes: 13 additions & 16 deletions src/Valine.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,12 @@ class Valine {
let _vlis = _vlist.querySelectorAll('li');
let _vat = _vcard.querySelector('.vat');
let _as = _vcard.querySelectorAll('a');
for (let k in _as) {
if (_as.hasOwnProperty(k)) {
let item = _as[k];
if (item.getAttribute('class') != 'at') {
item.setAttribute('target', '_blank');
item.setAttribute('rel', 'nofollow');
}
}
for (let i=0,len=_as.length;i<len;i++) {
let item = _as[i];
if (item && item.getAttribute('class') != 'at') {
item.setAttribute('target', '_blank');
item.setAttribute('rel', 'nofollow');
}
}
_root.bindAt(_vat);
_vlist.insertBefore(_vcard, _vlis[1]);
Expand Down Expand Up @@ -384,15 +382,14 @@ class Valine {
let _vlist = _root.el.querySelector('.vlist');
let _vlis = _vlist.querySelectorAll('li');
let _as = _vcard.querySelectorAll('a');
for (let k in _as) {
if (_as.hasOwnProperty(k)) {
let item = _as[k];
if (item.getAttribute('class') !== 'at') {
item.setAttribute('target', '_blank');
item.setAttribute('rel', 'nofollow');
}
}
for (let i=0,len=_as.length;i<len;i++) {
let item = _as[i];
if (item && item.getAttribute('class') != 'at') {
item.setAttribute('target', '_blank');
item.setAttribute('rel', 'nofollow');
}
}

let _vat = _vcard.querySelector('.vat');
_root.bindAt(_vat);
_vlist.insertBefore(_vcard, _vlis[1]);
Expand Down
2 changes: 1 addition & 1 deletion src/Valine.scss
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
.vlist {
// border-top: 1px solid #dedede;
// border-bottom: 1px solid #dedede;
padding: 0;
width: 100%;
.vcard {
display: flex;
display: -ms-flexbox;
Expand Down

0 comments on commit 1b3a892

Please sign in to comment.