We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b232f1b commit 3d4d38dCopy full SHA for 3d4d38d
src/share-buttons.js
@@ -29,10 +29,8 @@
29
var i,
30
share = document.querySelectorAll('.share-btn');
31
32
- for (i in share) {
33
- if (share.hasOwnProperty(i)) {
34
- this.initForElement(share[i]);
35
- }
+ for (i = share.length; i--;) {
+ this.initForElement(share[i]);
36
}
37
};
38
@@ -43,15 +41,13 @@
43
41
44
42
a = el.querySelectorAll('a');
45
46
- for (i in a) {
47
- if (a.hasOwnProperty(i)) {
48
- this.prepareLink(a[i], {
49
- id: '',
50
- url: this.getUrl(el),
51
- title: this.getTitle(el),
52
- desc: this.getDesc(el)
53
- });
54
+ for (i = a.length; i--;) {
+ this.prepareLink(a[i], {
+ id: '',
+ url: this.getUrl(el),
+ title: this.getTitle(el),
+ desc: this.getDesc(el)
+ });
55
56
57
0 commit comments