Updates hash with selected fonts when selected font changes.
This commit is contained in:
parent
3c8cc2d8b4
commit
c3c5947d89
11
index.html
11
index.html
|
@ -328,6 +328,7 @@ function updateGutters(cm) {
|
||||||
|
|
||||||
$("#font-info p").hide();
|
$("#font-info p").hide();
|
||||||
$("." + font).show();
|
$("." + font).show();
|
||||||
|
updateHash();
|
||||||
}
|
}
|
||||||
|
|
||||||
function setSize() {
|
function setSize() {
|
||||||
|
@ -340,7 +341,15 @@ function updateGutters(cm) {
|
||||||
$(".CodeMirror").addClass("no-smooth");
|
$(".CodeMirror").addClass("no-smooth");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function updateHash(){
|
||||||
|
var newHash = '#' + $("#select-font").val();
|
||||||
|
if(history.pushState) {
|
||||||
|
history.pushState(null, null, newHash);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
location.hash = newHash;
|
||||||
|
}
|
||||||
|
}
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
//randomly select a theme
|
//randomly select a theme
|
||||||
|
|
Loading…
Reference in New Issue