Permalink
Browse files

Merge pull request #51 from Randgalt/master

Bug fixes
  • Loading branch information...
2 parents 493e8f9 + d4167ee commit d160148c8d816b70449c85d576f75ed1904b1439 @Randgalt Randgalt committed Mar 8, 2013
Showing with 15 additions and 12 deletions.
  1. +4 −4 index.html
  2. +11 −8 js/nf.js
View
@@ -10,9 +10,9 @@
<script type="text/javascript" src="js/jquery.dateFormat-1.0.js"></script>
<script type="text/javascript" src="http://d3js.org/d3.v2.min.js"></script>
- <link rel="stylesheet" type="text/css" href="css/style.css?v=201303071100">
- <link rel="stylesheet" type="text/css" href="css/blog.css?v=201303071100">
- <link rel="stylesheet" type="text/css" href="css/commits.css?v=201303071100">
+ <link rel="stylesheet" type="text/css" href="css/style.css?v=201303081202">
+ <link rel="stylesheet" type="text/css" href="css/blog.css?v=201303081202">
+ <link rel="stylesheet" type="text/css" href="css/commits.css?v=201303081202">
<!--[if IE]>
<style>
.repo-item-cover, .repo-item-shadow, .repo-item-button
@@ -41,7 +41,7 @@
</script>
<script type="text/javascript" src="http://githubproxy-942908148.us-east-1.elb.amazonaws.com/REST/v2/consolidated?jsonp=repos"></script>
<script type="text/javascript" src="js/models.js?v=201303071100"></script>
- <script type="text/javascript" src="js/nf.js?v=201303072325"></script>
+ <script type="text/javascript" src="js/nf.js?v=201303071100"></script>
</head>
<body>
View
@@ -106,12 +106,17 @@ function adjustBalloon()
}
}
+function isTabCode(str, item)
+{
+ return str && item && (str.indexOf(item.code) == 0);
+}
+
function showTab(which)
{
for ( var i = 0; i < tabs.length; ++i )
{
var item = tabs[i];
- if ( which && which.match(item.code + '.*') )
+ if ( isTabCode(which, item) )
{
if ( item.handler )
{
@@ -394,18 +399,16 @@ function getViewParam()
function refineBlogHash(hash)
{
$('#tab-content-blog').show();
+ location.hash = hash;
- var parts = hash.split('-');
var blogName;
- if ( parts.length < 2 )
+ if ( hash.indexOf("blog-") == 0 )
{
- location.hash = parts[0];
- blogName = blogs[0].code;
+ blogName = hash.substring(5);
}
- else
+ else
{
- location.hash = hash;
- blogName = parts[1];
+ blogName = blogs[0].code;
}
$('#blog-content').load('blogs/' + blogName + ".html", null, function(){

0 comments on commit d160148

Please sign in to comment.