remember page for pdf texts and show in url
This commit is contained in:
parent
f8830119e0
commit
0b474aa4cb
7 changed files with 60 additions and 25 deletions
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue