// mini GUY interface for pagedjs // written by Dorian Timmermans // DONE: // * zoom level (that does not influence the interface) // * save checkboxes state and scroll level through ctrl+R (put in url?) // * interface outline have constant stroke width // TODO: // * go to page x button // * start // * don't spread if only 1 sheet // * prevent classic zoom // --- Start // reload value from sessionStorage // IMPORTANT NOTE: for that to work we have to call this function after pagedjs // using the window.PagedConfig after parameter // handler/hook or calling pagedjs async does not work! function getSessionValue(valueName, defaultValue){ let sessionValue = JSON.parse(sessionStorage.getItem(valueName)); return sessionValue === null ? defaultValue : sessionValue; } let SPREAD = getSessionValue("spread", false); let PREVIEW = getSessionValue("preview", false); let ZOOM = getSessionValue("zoom", 1); let PAGE = getSessionValue("page", 1); let INTERFACE_CREATED = false; function createZoomSlider(){ // html let $container = $('
').addClass('control'); let $slider = $('').attr('type', 'range'); let $label = $('