Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c248b62

Browse filesBrowse files
committed
Remove unnecessary check
Use let rather than var
1 parent 7bc420a commit c248b62
Copy full SHA for c248b62

File tree

1 file changed

+3
-6
lines changed
Filter options

1 file changed

+3
-6
lines changed

‎coderstats/data/coderstats.js

Copy file name to clipboardExpand all lines: coderstats/data/coderstats.js
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
var path = document.location.pathname,
1+
let path = document.location.pathname,
22
details,
33
login,
44
url;
5-
5+
66
if (m = path.match(/^\/([\w-]+)\??.*?/)) {
77
login = m[1].trim();
88
if (-1 === ['timeline', 'languages', 'blog', 'explore'].indexOf(login)) {
@@ -16,10 +16,7 @@ if (m = path.match(/^\/([\w-]+)\??.*?/)) {
1616

1717

1818
function addLink() {
19-
let cslink = document.getElementById('coderstats');
20-
if (cslink) return;
21-
22-
var li = document.createElement('li');
19+
let li = document.createElement('li');
2320
li.setAttribute('id', 'coderstats');
2421
li.setAttribute('class', 'vcard-detail pt-1');
2522
li.setAttribute('itemprop', 'url');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.