From 53204d067b38f9c9104a99fa1ba99ca606bbfb31 Mon Sep 17 00:00:00 2001 From: octospacc Date: Mon, 1 Jul 2024 20:45:14 +0200 Subject: [PATCH] Fix ServiceWorker, update MBViewer, misc app fixes --- shared/OctoHub-Global.js | 2 +- static/MBViewer/css/MBViewer.css | 30 ++++++ static/MBViewer/css/print.css | 12 ++- static/MBViewer/index.html | 11 ++- static/MBViewer/js/MBViewer.js | 131 +++++++++++++++++++++----- static/MatrixStickerHelper/index.html | 7 +- static/ServiceWorker.js | 10 +- static/TiktOctt/index.html | 2 +- 8 files changed, 172 insertions(+), 33 deletions(-) diff --git a/shared/OctoHub-Global.js b/shared/OctoHub-Global.js index 7d74831..7ba3d23 100644 --- a/shared/OctoHub-Global.js +++ b/shared/OctoHub-Global.js @@ -19,7 +19,7 @@ if (['', 'hub.octt.eu.org'].includes(location.host)) { font-size: smaller; text-align: center; `; - noticeElem.innerHTML = `You are viewing this page on the secondary/backup domain. Open it on hub.octt.eu.org. + noticeElem.innerHTML = `You are viewing this page on a secondary/backup domain. Open it on hub.octt.eu.org.

` : '') + MbState.siteData.description); if (MbState.siteData.iconUrl) { $('.tgme_page_photo_image').html(``); } else { @@ -652,9 +728,16 @@ function ResizeLayouts () { } $('a[name="goBack"]')[0].onclick = function(){ - ArgsRewrite({ dataurl: null, siteurl: null, postid: null, platform: null, includestyle: null, includescript: null /*postslug: null*/ }); + //ArgsRewrite({ dataurl: null, siteurl: null, postid: null, platform: null, includestyle: null, includescript: null /*postslug: null*/ }); + location.hash = ''; }; +if (!MbStorage('chats')) { + const octospacc = { name: "fritto misto di octospacc (Consigliato)", siteUrl: "https://octospacc.altervista.org", iconUrl: "https://octospacc.altervista.org/wp-content/uploads/2024/05/fried-shrimp_1f364.png" }; + octospacc.queryUrl = `#/siteUrl=${octospacc.siteUrl}`; + MbStorage('chats', [{}, octospacc]); +} + // TODO: we should check origin window.addEventListener('message', function(event){ // TODO edit the video embed function to send objects for consistency diff --git a/static/MatrixStickerHelper/index.html b/static/MatrixStickerHelper/index.html index 62a3792..522ed01 100644 --- a/static/MatrixStickerHelper/index.html +++ b/static/MatrixStickerHelper/index.html @@ -1,4 +1,6 @@ + + @@ -39,7 +41,8 @@ TODO: * APNG encoding, if it works * allow copying the JSON (and optionally reuploading images? probably not needed tho) when importing existing Maunium packs --> - + +