Reorganize, performance tweaks
This commit is contained in:
parent
a97d447090
commit
8566965ee7
2 changed files with 13 additions and 7 deletions
|
|
@ -8,17 +8,19 @@
|
||||||
* [If, Else, While](/if_else_while/)
|
* [If, Else, While](/if_else_while/)
|
||||||
* [Case Statements](/case/)
|
* [Case Statements](/case/)
|
||||||
* [For Loops & Iterators](/for_iterators/)
|
* [For Loops & Iterators](/for_iterators/)
|
||||||
|
* [Procs](/procs/)
|
||||||
|
* [Methods](/methods/)
|
||||||
|
* [Lambdas](/lambdas/)
|
||||||
* [Blocks](/block/)
|
* [Blocks](/block/)
|
||||||
* [Primitive Types](/primitives/)
|
* [Primitive Types](/primitives/)
|
||||||
* [Types](/types/)
|
* [Type Aliases](/types/)
|
||||||
* [Object Types](/types/objects/)
|
* [Object Types](/types/objects/)
|
||||||
* [Enum Types](/types/enums/)
|
* [Enum Types](/types/enums/)
|
||||||
* [Distinct Types](/types/distinct/)
|
* [Distinct Types](/types/distinct/)
|
||||||
* [Strings](/strings/)
|
* [Strings](/strings/)
|
||||||
* [Arrays](/arrays/)
|
* [Arrays](/arrays/)
|
||||||
* [Seqs](/seqs/)
|
* [Seqs](/seqs/)
|
||||||
* [Bitsets](/bitsets/)
|
* [Bitsets](/bitsets/)
|
||||||
* [Procedures](/procs/)
|
|
||||||
* [Exceptions](/exceptions/)
|
* [Exceptions](/exceptions/)
|
||||||
* [Varargs](/varargs/)
|
* [Varargs](/varargs/)
|
||||||
* [OOP Macro](/oop_macro/)
|
* [OOP Macro](/oop_macro/)
|
||||||
|
|
|
||||||
|
|
@ -33,22 +33,26 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var starcount_elem = document.getElementById("starcount");
|
||||||
function updateStarCounter(){
|
function updateStarCounter(){
|
||||||
|
if(localStorage.getItem("_watchers") != null){
|
||||||
|
starcount_elem.innerHTML = localStorage.getItem("_watchers");
|
||||||
|
}
|
||||||
var request = new XMLHttpRequest();
|
var request = new XMLHttpRequest();
|
||||||
request.open("GET", "https://api.github.com/repos/flaviut/nimrod-by-example/stargazers", true);
|
request.open("GET", "https://api.github.com/repos/flaviut/nimrod-by-example/stargazers", true);
|
||||||
request.onload = function (e) {
|
request.onload = function (e) {
|
||||||
var starcount = JSON.parse(request.responseText).length;
|
var starcount = JSON.parse(request.responseText).length;
|
||||||
var starcount_elem = document.getElementById("starcount");
|
|
||||||
starcount_elem.innerHTML = starcount;
|
starcount_elem.innerHTML = starcount;
|
||||||
|
localStorage.setItem("_watchers", starcount)
|
||||||
};
|
};
|
||||||
request.onerror = function (e) {
|
request.onerror = function (e) {
|
||||||
console.error(request.statusText);
|
console.error(request.statusText);
|
||||||
};
|
};
|
||||||
request.send(null);
|
request.send(null);
|
||||||
}
|
}
|
||||||
|
updateStarCounter()
|
||||||
localStorage.setItem(window.location.pathname, true);
|
localStorage.setItem(window.location.pathname, true);
|
||||||
setVisibleTags()
|
setVisibleTags()
|
||||||
updateStarCounter()
|
|
||||||
</script>
|
</script>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue