From 5a4a5b0d75caa4a9d7e7c0653987c79d69db8236 Mon Sep 17 00:00:00 2001 From: octospacc Date: Tue, 19 Mar 2024 01:37:06 +0100 Subject: [PATCH] Update and hotfix FramesBrowser --- public/FramesBrowser/index.html | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/public/FramesBrowser/index.html b/public/FramesBrowser/index.html index 4b669f4..8556ebc 100644 --- a/public/FramesBrowser/index.html +++ b/public/FramesBrowser/index.html @@ -83,15 +83,11 @@ height: var(--BtnActionHeight); } -
- +
@@ -118,9 +114,13 @@

Note: the app is still in development and data handling may break between versions! Backup your data externally to avoid losing it.

You can also visit, or go back to, my home page (OctoSpacc Hub): hub.octt.eu.org!

Changelog

+

2024-03-19

    +
  • Remove info button from toolbar for now.
  • + +

2024-03-18

  • First implementation of handling of URL hash parameters (reduced or "quick" format).
  • -
  • Open a specific URI or raw HTML data via URL hash (click the links to try!).
  • +
  • Open a specific URI or raw HTML data via URL hash (click the links to try!).
  • Add "fullscreen" (hide the main app bar) option to GUI (persistent) and quick URL hash flags.
  • Fixed some issues with handling UTF8 data URIs.
  • Make frame zoom option persistent.
  • @@ -158,6 +158,7 @@ localStorage.setItem('org.eu.octt.FramesBrowser.v1', JSON.stringify({ ...AppData, ...(SesAppData.optionsFromUrl ? SesAppDataBak : SesAppData) })); }; + var FrameZoomLevels = [50, 200]; var SampleHtmlContent = MainAppContent.innerHTML; MainAppContent.innerHTML = ''; document.body.style.overflow = 'hidden'; @@ -186,10 +187,6 @@ req.send(); }; - function ShowAppInfo(){ - alert(AppInfoString); - }; - function InputHandleKey(ev){ // Enter if (ev.keyCode == 13) { @@ -440,9 +437,9 @@ Array.from(document.querySelectorAll('noscript, .NoScript')).forEach(function(el){ el.remove() }); AppData = (JSON.parse(localStorage.getItem('org.eu.octt.FramesBrowser.v1')) || {}); SesAppData = { + optionsFromUrl: (AppData.optionsFromUrl || false), fullscreen: (AppData.fullscreen || false), frameZoomIndex: (isNaN(parseInt(AppData.frameZoomIndex)) ? -1 : AppData.frameZoomIndex), - optionsFromUrl: (AppData.optionsFromUrl || false), }; SesAppDataBak = structuredClone(SesAppData); AppData = { @@ -484,6 +481,7 @@ tokens[0] = tokens[0].slice(2); var fieldData = tokens.join('|'); var url = ((optLow.startsWith('h=') ? 'data:text/html;utf8,' : '') + fieldData); + console.log(url, GetTabUrlFromTabIndex(AppData.currentTabIndex), AppData.currentTabIndex, GetTabUrlFromTabIndex(AppData.currentTabIndex) !== url); if (GetTabUrlFromTabIndex(AppData.currentTabIndex) !== url) { AddFrame(); document.querySelector('input[type="text"]').value = url;