Interesting point, I think you cannot use the builtin GoToPage, maybe in the future you give us an idea :)
window['myEpubTotalPages'] = 6
where 6 is the number of pages.
var paths = window.location.pathname.split('/'); var currPageNum = parseInt(paths[paths.length-2]); var newPage = Math.floor(Math.random() * (window['myEpubTotalPages'])) + 1; while (newPage == currPageNum) newPage = Math.floor(Math.random() * (window['myEpubTotalPages'])) + 1; window.location.href = '../'+newPage+'/page.xhtml';
idea here is to jump to a page between 1 and "myEpubTotalPages" avoiding current page