obsidian-web/resources/js/main.js
Curle dbabeeefb9
Current working tree.
Has some issues to be worked out.
2020-09-14 21:28:00 +01:00

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();
});
});