| 1234567891011121314151617181920212223242526272829303132333435363738 |
- $(() => {
- function loadHash(md5sum) {
- if (md5sum && md5sum.length)
- LoadingTasks.push(async () => displayMediaFullPage(await MediaStorage.Instance.getMedia(md5sum)));
- else
- document.getElementById("pch-fullPageMedia").classList.add("hidden");
- }
- window.addEventListener("hashchange", x => {
- x.preventDefault();
- loadHash(document.location?.hash?.substr(1))
- return true;
- });
- onScrollBottom = (function () {
- this.lastCall= null;
- this.fnc = () => {
- if (this.lastCall !== null)
- return;
- this.lastCall = setTimeout(() => {
- this.lastCall = null;
- }, 1000);
- window.displayMoreMedia();
- };
- return this;
- })();
- window.addEventListener("scroll", evt => {
- if (window.scrollY+window.innerHeight >= document.body.clientHeight)
- onScrollBottom.fnc();
- });
- AccessManager.RebuildAccess();
- loadHash(document.location?.hash?.substr(1));
- MediaStorage.Instance.downloadMetaList();
- });
|