Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug fix (if invalid location hash is used)

  • Loading branch information...
commit 07e179648ca9c140b4cc633eea637ce27103b2e1 1 parent 8b73c91
@dmfrancisco authored
Showing with 13 additions and 3 deletions.
  1. +13 −3 public/js/script.js
View
16 public/js/script.js
@@ -255,14 +255,24 @@ function initTipsy() {
}
function changeSelectedLanguage(lang) {
- if (lang === "") lang = "textile";
-
$('.language').each(function() {
$(this).text($(this).text().replace('', ''));
})
- $("#language-"+ lang).append("");
renderMode = lang;
+ switch (lang)
+ {
+ case "plain":
+ renderMode = "plain";
+ break;
+ case "markdown":
+ renderMode = "markdown";
+ break;
+ case "textile":
+ default:
+ renderMode = "textile";
+ }
+ $("#language-"+ renderMode).append("");
window.location.hash = renderMode;
}
Please sign in to comment.
Something went wrong with that request. Please try again.