Skip to content
Browse files

fixed hash matching issues

  • Loading branch information...
1 parent 702b6fc commit e5e8145c635f039843488cadd837e79e444fb292 @Randgalt Randgalt committed Mar 8, 2013
Showing with 7 additions and 5 deletions.
  1. +7 −5 js/nf.js
View
12 js/nf.js
@@ -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,10 +399,7 @@ function getViewParam()
function refineBlogHash(hash)
{
$('#tab-content-blog').show();
- if ( location.hash != hash )
- {
- location.hash = hash;
- }
+ location.hash = hash;
var blogName;
if ( hash.indexOf("blog-") == 0 )

0 comments on commit e5e8145

Please sign in to comment.
Something went wrong with that request. Please try again.