28 lines
815 B
JavaScript
28 lines
815 B
JavaScript
|
function updateURL( URL, Name) {
|
||
|
|
||
|
if (typeof history.pushState == 'function' ) {
|
||
|
var stateObj = { foo: "bar" };
|
||
|
history.pushState( stateObj, "Obsidian - " + Name, URL);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$("document").ready(function() {
|
||
|
$(".folder").click(function() {
|
||
|
$("#loading").show();
|
||
|
title = encodeURI($(this).children(".title").children("a").attr("href"));
|
||
|
Name = $(this).children(".title").children("a").html();
|
||
|
$("body").load(title);
|
||
|
updateURL(title, Name);
|
||
|
});
|
||
|
|
||
|
$(".thumb").click(function() {
|
||
|
title = encodeURI($(this).children("a").attr("bref"));
|
||
|
$("#lightbox").html('<img src="' + title + '">');
|
||
|
$("#viewer").fadeIn();
|
||
|
return false;
|
||
|
});
|
||
|
|
||
|
$("#container").click(function() {
|
||
|
$("#viewer").fadeOut();
|
||
|
});
|
||
|
});
|