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