diff --git a/lib/Pod/Site/podsite.js b/lib/Pod/Site/podsite.js index 3b0e0ca..36f9fec 100644 --- a/lib/Pod/Site/podsite.js +++ b/lib/Pod/Site/podsite.js @@ -80,14 +80,34 @@ $(document).ready(function() { return false; }); }; - + + var base_uri = $('meta[name="base-uri"]').attr('content'); + + var url_to_module = function (str) { + str = str.replace(location.origin, ''); + str = str.replace(base_uri, ''); + return str.replace(/[.]html$/, '').split('/').join('::'); + }; + + var load_module = function (url) { + $('#doc').load(url, function (text, status, xhr) { + if (xhr.status == 200) { return cb() } + $('#doc').html( + '