Skip to content

Commit

Permalink
Merge pull request #2 from payalnik/master
Browse files Browse the repository at this point in the history
home and me in user menu
  • Loading branch information
SiTLar committed Jun 3, 2015
2 parents 6338ddd + d1c8cb9 commit e805447
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

config.json

config.json

favicon.ico
9 changes: 9 additions & 0 deletions index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
</head>

<body onload="initDoc()">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-62517081-1', 'auto');
ga('send', 'pageview');

</script>
</body>
</html>
9 changes: 8 additions & 1 deletion parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -694,9 +694,16 @@ function getauth(oFormElement){
function logout(){
window.localStorage.setItem("token", '');
location.reload();
};

function me(){
window.location.href = gMe['users']['username'];
}

function home(){
window.location.href = '';
}

};
function parseGET() {
var reqs = new Array();
var req = new Array();
Expand Down
4 changes: 4 additions & 0 deletions templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ var templates = {"nodes": [

{"c":"controls-user","t":"div",
"children":[
{"c":"user-home","t":"a","txt":"home","e":{"click":"home"}},
{"t":"span","txt":" &#8226; "},
{"c":"user-me","t":"a","txt":"me","e":{"click":"me"}},
{"t":"span","txt":" &#8226; "},
{"c":"user-logout","t":"a","txt":"logout","e":{"click":"logout"}}
]
},
Expand Down

0 comments on commit e805447

Please sign in to comment.