remember page for pdf texts and show in url

This commit is contained in:
j 2013-03-02 13:01:07 +00:00
commit 0b474aa4cb
7 changed files with 60 additions and 25 deletions

View file

@ -1,3 +1,17 @@
Ox.load(function() {
window.addEventListener('hashchange', function() {
var page = document.location.hash.substring(1).split('=')[1];
page && Ox.$parent.postMessage('page', {
page: page
});
});
Ox.$parent.onMessage(function(event, data, oxid) {
if (event == 'page' && Ox.isUndefined(oxid)) {
window.location.hash = '#page=' + data.page;
}
});
});
function getVideoOverlay(page) {
var links = embeds.filter(function(embed) {
return embed.page == page && embed.type =='inline';