From 87757fbcee643ad3f37bce851e0fc25822964183 Mon Sep 17 00:00:00 2001 From: octospacc Date: Fri, 19 Apr 2024 00:34:22 +0200 Subject: [PATCH] Update site structure, update global js to add domain warning, update SpiderADB --- .gitignore | 5 +- Build.sh | 18 ++- shared/OctoHub-Global.js | 29 ++++ {src => source}/SpiderADB/.gitignore | 0 {src => source}/SpiderADB/Build.sh | 0 {src => source}/SpiderADB/Requirements.sh | 0 {src => source}/SpiderADB/SpiderADB.js | 153 +++++++++++++----- .../SpiderADB/holo-web/holo-base-elements.css | 0 .../SpiderADB/holo-web/holo-base-widgets.css | 0 .../SpiderADB/holo-web/holo-extra-octt.css | 4 +- .../SpiderADB/holo-web/holo-extra-octt.js | 20 ++- .../holo-web/holo-ics-dark-elements.css | 0 .../holo-web/holo-ics-dark-widgets.css | 0 .../SpiderADB/holo-web/holo-menu.png | Bin .../SpiderADB/holo-web/holo-touch.js | 0 {src => source}/SpiderADB/index.html | 60 +++++-- {src => source}/SpiderADB/package-lock.json | 12 ++ {src => source}/SpiderADB/package.json | 1 + {src => source}/SpiderADB/util.js | 0 {src => source}/WuppiMini/.gitignore | 0 {src => source}/WuppiMini/Build.sh | 0 {src => source}/WuppiMini/Requirements.sh | 0 {src => source}/WuppiMini/index.js | 1 + {src => source}/WuppiMini/package-lock.json | 0 {src => source}/WuppiMini/package.json | 0 {public => static}/Assets/CSS/Dark.css | 0 .../Assets/CSS/Font_F25_Bank_Printer.css | 0 .../Assets/Fonts/F25_Bank_Printer.woff2 | Bin {public => static}/Assets/JS/CurrentAge.js | 0 .../Assets/JS/CurrentAgeRenderIndex.js | 0 {public => static}/Assets/JS/RandomGIF.js | 0 {public => static}/Assets/Lib/Trasformapi.js | 0 {public => static}/Assets/Lib/cleanHTML.js | 0 {public => static}/Assets/Lib/defiant.min.js | 0 .../Assets/Lib/lodash.custom.min.js | 0 {public => static}/Collections/index.html | 0 {public => static}/Ecoji/index.html | 0 {public => static}/FramesBrowser/index.html | 0 .../FramesBrowser/manifest.json | 0 {public => static}/HashyMagnet/Bubbles.css | 0 {public => static}/HashyMagnet/index.html | 0 {public => static}/HashyMagnet/manifest.json | 0 {public => static}/MBViewer/babel.config.json | 0 {public => static}/MBViewer/css/MBViewer.css | 0 {public => static}/MBViewer/css/print.css | 0 .../MBViewer/css/telegram-web.css | 0 .../MBViewer/css/widget-frame.css | 0 .../MBViewer/img/tgme/pattern.svg | 0 {public => static}/MBViewer/index.html | 0 {public => static}/MBViewer/js/MBViewer.js | 0 .../MBViewer/js/TrasformapiSchema.xml.js | 0 .../MBViewer/js/jquery-ui.min.js | 0 {public => static}/MBViewer/js/jquery.min.js | 0 .../MBViewer/js/telegram-web.js | 0 {public => static}/MBViewer/js/tgsticker.js | 0 .../MBViewer/js/tgwallpaper.min.js | 0 .../MBViewer/js/widget-frame.js | 0 .../0nkwC9f7MfsBiWcLtY65AWDK873ljiK-.ttf | Bin .../NeuchaPatrickHandSC.css | 0 .../MatrixStickerHelper/gifskiWasm.mjs | 0 .../MatrixStickerHelper/gifski_wasm_bg.wasm | Bin .../MatrixStickerHelper/index.html | 0 .../MatrixStickerHelper/paper.min.css | 0 .../q5uGsou0JOdh94bfvQlo.ttf | Bin .../MatrixStickerHelper/telegram.js | 0 .../MatrixStickerHelper/tgs-player.js | 0 {public => static}/RichPreview/FumoPrisms.jpg | Bin {public => static}/RichPreview/index.jpg | Bin {public => static}/ServiceWorker.js | 0 {public => static}/Userscripts/index.html | 0 {public => static}/favicon.png | Bin {public => static}/index.html | 20 ++- {public => static}/robots.txt | 0 .../stuff/embed.octo.whixard.tech.html | 0 {public => static}/stuff/links/LinuxGore.html | 0 .../stuff/links/embeds/LinuxGore.png | Bin .../stuff/links/embeds/octokek.jpg | Bin {public => static}/stuff/links/octokek.html | 0 {public => static}/stuff/locked-tgreact.html | 0 .../stuff/octo.whixard.tech.html | 0 80 files changed, 248 insertions(+), 75 deletions(-) rename {src => source}/SpiderADB/.gitignore (100%) rename {src => source}/SpiderADB/Build.sh (100%) rename {src => source}/SpiderADB/Requirements.sh (100%) rename {src => source}/SpiderADB/SpiderADB.js (52%) rename {src => source}/SpiderADB/holo-web/holo-base-elements.css (100%) rename {src => source}/SpiderADB/holo-web/holo-base-widgets.css (100%) rename {src => source}/SpiderADB/holo-web/holo-extra-octt.css (95%) rename {src => source}/SpiderADB/holo-web/holo-extra-octt.js (73%) rename {src => source}/SpiderADB/holo-web/holo-ics-dark-elements.css (100%) rename {src => source}/SpiderADB/holo-web/holo-ics-dark-widgets.css (100%) rename {src => source}/SpiderADB/holo-web/holo-menu.png (100%) rename {src => source}/SpiderADB/holo-web/holo-touch.js (100%) rename {src => source}/SpiderADB/index.html (52%) rename {src => source}/SpiderADB/package-lock.json (89%) rename {src => source}/SpiderADB/package.json (82%) rename {src => source}/SpiderADB/util.js (100%) rename {src => source}/WuppiMini/.gitignore (100%) rename {src => source}/WuppiMini/Build.sh (100%) rename {src => source}/WuppiMini/Requirements.sh (100%) rename {src => source}/WuppiMini/index.js (99%) rename {src => source}/WuppiMini/package-lock.json (100%) rename {src => source}/WuppiMini/package.json (100%) rename {public => static}/Assets/CSS/Dark.css (100%) rename {public => static}/Assets/CSS/Font_F25_Bank_Printer.css (100%) rename {public => static}/Assets/Fonts/F25_Bank_Printer.woff2 (100%) rename {public => static}/Assets/JS/CurrentAge.js (100%) rename {public => static}/Assets/JS/CurrentAgeRenderIndex.js (100%) rename {public => static}/Assets/JS/RandomGIF.js (100%) rename {public => static}/Assets/Lib/Trasformapi.js (100%) rename {public => static}/Assets/Lib/cleanHTML.js (100%) rename {public => static}/Assets/Lib/defiant.min.js (100%) rename {public => static}/Assets/Lib/lodash.custom.min.js (100%) rename {public => static}/Collections/index.html (100%) rename {public => static}/Ecoji/index.html (100%) rename {public => static}/FramesBrowser/index.html (100%) rename {public => static}/FramesBrowser/manifest.json (100%) rename {public => static}/HashyMagnet/Bubbles.css (100%) rename {public => static}/HashyMagnet/index.html (100%) rename {public => static}/HashyMagnet/manifest.json (100%) rename {public => static}/MBViewer/babel.config.json (100%) rename {public => static}/MBViewer/css/MBViewer.css (100%) rename {public => static}/MBViewer/css/print.css (100%) rename {public => static}/MBViewer/css/telegram-web.css (100%) rename {public => static}/MBViewer/css/widget-frame.css (100%) rename {public => static}/MBViewer/img/tgme/pattern.svg (100%) rename {public => static}/MBViewer/index.html (100%) rename {public => static}/MBViewer/js/MBViewer.js (100%) rename {public => static}/MBViewer/js/TrasformapiSchema.xml.js (100%) rename {public => static}/MBViewer/js/jquery-ui.min.js (100%) rename {public => static}/MBViewer/js/jquery.min.js (100%) rename {public => static}/MBViewer/js/telegram-web.js (100%) rename {public => static}/MBViewer/js/tgsticker.js (100%) rename {public => static}/MBViewer/js/tgwallpaper.min.js (100%) rename {public => static}/MBViewer/js/widget-frame.js (100%) rename {public => static}/MatrixStickerHelper/0nkwC9f7MfsBiWcLtY65AWDK873ljiK-.ttf (100%) rename {public => static}/MatrixStickerHelper/NeuchaPatrickHandSC.css (100%) rename {public => static}/MatrixStickerHelper/gifskiWasm.mjs (100%) rename {public => static}/MatrixStickerHelper/gifski_wasm_bg.wasm (100%) rename {public => static}/MatrixStickerHelper/index.html (100%) rename {public => static}/MatrixStickerHelper/paper.min.css (100%) rename {public => static}/MatrixStickerHelper/q5uGsou0JOdh94bfvQlo.ttf (100%) rename {public => static}/MatrixStickerHelper/telegram.js (100%) rename {public => static}/MatrixStickerHelper/tgs-player.js (100%) rename {public => static}/RichPreview/FumoPrisms.jpg (100%) rename {public => static}/RichPreview/index.jpg (100%) rename {public => static}/ServiceWorker.js (100%) rename {public => static}/Userscripts/index.html (100%) rename {public => static}/favicon.png (100%) rename {public => static}/index.html (94%) rename {public => static}/robots.txt (100%) rename {public => static}/stuff/embed.octo.whixard.tech.html (100%) rename {public => static}/stuff/links/LinuxGore.html (100%) rename {public => static}/stuff/links/embeds/LinuxGore.png (100%) rename {public => static}/stuff/links/embeds/octokek.jpg (100%) rename {public => static}/stuff/links/octokek.html (100%) rename {public => static}/stuff/locked-tgreact.html (100%) rename {public => static}/stuff/octo.whixard.tech.html (100%) diff --git a/.gitignore b/.gitignore index 9b51971..55557e0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ *.bak node_modules/ -/public/a/ -/public/s/ -/public/SpiderADB/ -/public/WuppiMini/ +/public/ diff --git a/Build.sh b/Build.sh index 78b579a..4fa2bb8 100755 --- a/Build.sh +++ b/Build.sh @@ -1,12 +1,24 @@ #!/bin/sh -for App in SpiderADB WuppiMini +SourceApps="SpiderADB WuppiMini" +HubSdkApps="$(SourceApps) Ecoji MatrixStickerHelper" + +rm -vrf ./public || true +cp -vr ./static ./public +cp -vr ./shared ./public/shared + +for App in $(SourceApps) do mkdir -p ./public/${App} - cd ./src/${App} + cd ./source/${App} sh ./Requirements.sh cp -r $(sh ./Build.sh) ../../public/${App}/ cd ../.. done -cp -r ./shared ./public/shared + cd ./public node ../WriteRedirectPages.js + +for App in $(HubSdkApps) +do + echo # TODO write manifest.json files +done diff --git a/shared/OctoHub-Global.js b/shared/OctoHub-Global.js index e69de29..bda5d55 100644 --- a/shared/OctoHub-Global.js +++ b/shared/OctoHub-Global.js @@ -0,0 +1,29 @@ +window.addEventListener('load', (function(){ + +if (!['', 'hub.octt.eu.org'].includes(location.host)) { + var noticeElem = document.createElement('p'); + noticeElem.style = ` + position: fixed; + z-index: 1000; + top: 0; + left: 0; + margin: 0; + width: 100%; + color: black; + background-color: thistle; + font-size: initial; + 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. + `; + document.body.appendChild(noticeElem); +} + +})); diff --git a/src/SpiderADB/.gitignore b/source/SpiderADB/.gitignore similarity index 100% rename from src/SpiderADB/.gitignore rename to source/SpiderADB/.gitignore diff --git a/src/SpiderADB/Build.sh b/source/SpiderADB/Build.sh similarity index 100% rename from src/SpiderADB/Build.sh rename to source/SpiderADB/Build.sh diff --git a/src/SpiderADB/Requirements.sh b/source/SpiderADB/Requirements.sh similarity index 100% rename from src/SpiderADB/Requirements.sh rename to source/SpiderADB/Requirements.sh diff --git a/src/SpiderADB/SpiderADB.js b/source/SpiderADB/SpiderADB.js similarity index 52% rename from src/SpiderADB/SpiderADB.js rename to source/SpiderADB/SpiderADB.js index 7696391..49f38ba 100644 --- a/src/SpiderADB/SpiderADB.js +++ b/source/SpiderADB/SpiderADB.js @@ -1,48 +1,54 @@ import * as Adb from '@yume-chan/adb'; import * as AdbDaemonWebUsb from '@yume-chan/adb-daemon-webusb'; import AdbWebCredentialStore from '@yume-chan/adb-credential-web'; -import { DecodeUtf8Stream } from '@yume-chan/stream-extra'; +import { DecodeUtf8Stream, WrapReadableStream, WrapConsumableStream } from '@yume-chan/stream-extra'; +import { PackageManager } from '@yume-chan/android-bin'; // TODO: // * warning on fail to claim USB interface (it may be because of other tabs, or a local adb server) // * warn or gracefully handle debug permission not granted // * package manager with install/uninstall/dump, debloat tool with default list and import/export // * fastboot shell and tools? possible? +// * logs for Packages section? (async function(){ const deviceSelect = $('select$deviceSelect$'); -const deviceConnect = $('button$deviceConnect$'); const terminalOutput = $('textarea$terminalOutput$'); -function resizeTerminal () { - terminalOutput.style.height = `${window.innerHeight - ((48 + 8) * 4)}px`; -} -resizeTerminal(); - -window.addEventListener('resize', (function(){ - resizeTerminal(); -})); - -$('input$terminalInput$').addEventListener('keydown', (async function(event){ - if (event.keyCode == 13) { // Enter - const cmd = $('input$terminalInput$').value; - terminalOutput.textContent += (cmd + '\n'); - const process = await Device.adb.subprocess.spawn(cmd); - await process.stdout.pipeThrough(new DecodeUtf8Stream()).pipeTo( - new WritableStream({ write(chunk) { - terminalOutput.textContent += chunk; - terminalOutput.scrollTop = terminalOutput.scrollHeight; - } }), - ); - terminalOutput.textContent += '\n> '; - $('input$terminalInput$').value = null; - }; -})); +$('button$apkInstall$').onclick = (async function(){ + // TODO show info popup before actually installing, also allow installing via drag&drop on packages section + const fileInput = $('button$apkInstall$').querySelector('input'); + fileInput.onchange = (function(event){ + const count = event.target.files.length; + if (!count > 0) { + return; + } + alert(`Installing ${count} package(s)...`); + const pm = new PackageManager(Device.adb); + Array.from(event.target.files).forEach(async function(file, index){ + try { + await pm.installStream(file.size, (new WrapReadableStream(file.stream())).pipeThrough(new WrapConsumableStream())); + alert(`Successfully installed package ${index + 1} of ${count}.`); + refreshPackagesList(); + } catch (err) { + alert(err); + } + }); + }); + fileInput.click(); +}); let Device = {}; const CredentialStore = new AdbWebCredentialStore(); +function resizeTerminal () { + const divider = (Device.adb ? 2 : 3); + terminalOutput.style.height = `${window.innerHeight - ((48 + 8) * divider)}px`; +} +window.addEventListener('resize', resizeTerminal); +resizeTerminal(); + const UsbManager = AdbDaemonWebUsb.AdbDaemonWebUsbDeviceManager.BROWSER; if (!UsbManager) { $('div$browserWarning$').innerHTML = `

@@ -79,8 +85,10 @@ async function connectAuthorizeDevice () { Device.transport = await Adb.AdbDaemonTransport.authenticate({ connection: Device.connection, credentialStore: CredentialStore }); Device.adb = new Adb.Adb(Device.transport); } catch (err) { - $('[name="deviceStatus"]').innerHTML = 'An error occurred while trying to establish a device connection. Please ensure that no other processes or browser tabs on this system are currently using the device, then retry.'; + $('p$deviceStatus$').textContent = 'An error occurred while trying to establish a device connection. Please ensure that no other processes or browser tabs on this system are currently using the device, then retry.'; } + } else { + $('p$deviceStatus$').textContent = null; } } @@ -103,15 +111,18 @@ async function refreshDeviceSelect () { deviceSelect.innerHTML = null; const devices = await UsbManager.getDevices(); if (devices.length) { + $('p$deviceStatus$').textContent = null; deviceSelect.innerHTML = ''; devices.forEach(function(device, index){ - var deviceOption = document.createElement('option'); + const deviceOption = document.createElement('option'); deviceOption.textContent = `${device.raw.productName} [${device.raw.serialNumber}]`; deviceSelect.appendChild(deviceOption); }); deviceSelect.onchange = onSwitchDevice; deviceSelect.disabled = false; } else { + // TODO probably put this warning elsewhere? because it seems like the browser can see even Androids with ADB disabled, obviously they won't be able to connect + $('p$deviceStatus$').innerHTML = 'Connect a debuggable Android device via USB to continue. (Read "How to Enable USB Debugging on Android" for help).'; deviceSelect.innerHTML = ''; } } @@ -123,7 +134,8 @@ async function onSwitchDevice () { } async function refreshDeviceInfo () { - if (deviceSelect.selectedIndex > 0) { + let onDevice = (deviceSelect.selectedIndex > 0); + if (onDevice) { const device = await getDevice(); $('$deviceOem$').innerHTML = `Brand: ${device.raw.manufacturerName}`; $('$deviceModel$').innerHTML = `Model: ${device.raw.productName}`; @@ -133,29 +145,38 @@ async function refreshDeviceInfo () { if (Device.adb) { $('$deviceStatus$').innerHTML = null; // $('$devicePropDump$').innerHTML = null; + $('$deviceCpuAbis$').innerHTML = `CPU ABIs: ${await Device.adb.getProp('ro.system.product.cpu.abilist')}`; $('$androidVersion$').innerHTML = `Android version: ${await Device.adb.getProp('ro.build.version.release')}`; - $('$androidApi$').innerHTML = `API version: ${await Device.adb.getProp('ro.build.version.sdk')}`; + $('$androidApi$').innerHTML = `SDK API version: ${await Device.adb.getProp('ro.build.version.sdk')}`; + //$('$androidNickname$').innerHTML = `Device name: ${await Device.adb.getProp('persist.sys.device_name')}`; + $('$androidBuildDate$').innerHTML = `Build date: ${await Device.adb.getProp('ro.vendor.build.date')}`; + $('$androidBuildFingerprint$').innerHTML = `Build fingerprint: ${await Device.adb.getProp('ro.vendor.build.fingerprint')}`; $('$androidInfo$').hidden = false; $('$connectReminder$').hidden = true; terminalOutput.disabled = false; - terminalOutput.textContent += '> '; - $('input$terminalInput$').disabled = false; + terminalOutput.textContent += (terminalOutput.textContent ? '\n> ' : '> '); + $('button$clearTerminal$').disabled = false; /* for (const line of (await Device.adb.getProp()).split('\n')) { const elem = document.createElement('li'); elem.textContent = line; $('$devicePropDump$').appendChild(elem); } */ } else { - $('$deviceInfo$').hidden = true; + onDevice = false; } - $('$deviceInfo$').hidden = false; } else { - $('$deviceStatus$').innerHTML = null; + //$('$deviceStatus$').innerHTML = null; $('$connectReminder$').hidden = false; terminalOutput.disabled = true; - $('input$terminalInput$').disabled = true; - $('$deviceInfo$').hidden = true; } + toggleDeviceElems(onDevice); +} + +function toggleDeviceElems (enabled) { + $('$deviceInfo$').hidden = !enabled; + $('button$apkInstall$').disabled = !enabled; + $('input$terminalInput$').disabled = !enabled; + resizeTerminal(); } async function refreshDeviceSection () { @@ -164,7 +185,7 @@ async function refreshDeviceSection () { } refreshDeviceSection(); -deviceConnect.onclick = (async function(){ +$('button$deviceConnect$').onclick = (async function(){ const device = await UsbManager.requestDevice(); if (!device) { return; @@ -174,6 +195,60 @@ deviceConnect.onclick = (async function(){ deviceSelect.selectedIndex = (deviceSelect.children.length - 1); deviceSelect.onchange(); }); -deviceConnect.disabled = false; +$('button$deviceConnect$').disabled = false; + +$('input$terminalInput$').addEventListener('keydown', (async function(event){ + if (event.keyCode == 13) { // Enter + const cmd = $('input$terminalInput$').value; + if (!terminalOutput.textContent) { + terminalOutput.textContent += '> '; + } + terminalOutput.textContent += (cmd + '\n'); + const process = await Device.adb.subprocess.spawn(cmd); + const processWriteToTerminal = () => new WritableStream({ write(chunk) { + terminalOutput.textContent += chunk; + terminalOutput.scrollTop = terminalOutput.scrollHeight; + $('button$clearTerminal$').disabled = false; + } }); + await process.stdout.pipeThrough(new DecodeUtf8Stream()).pipeTo(processWriteToTerminal()); + await process.stderr.pipeThrough(new DecodeUtf8Stream()).pipeTo(processWriteToTerminal()); + terminalOutput.textContent += '\n> '; + terminalOutput.scrollTop = terminalOutput.scrollHeight; + $('input$terminalInput$').value = null; + }; +})); + +$('button$clearTerminal$').onclick = (function(){ + terminalOutput.textContent = ''; + $('button$clearTerminal$').disabled = true; +}); + +$('button$wrapTerminal$').onclick = (function(){ + terminalOutput.style.textWrap = (terminalOutput.style.textWrap ? '' : 'nowrap'); + terminalOutput.scrollTop = terminalOutput.scrollHeight; +}); + +async function refreshPackagesList () { + $('ul$packageList$').innerHTML = null; + const pm = new PackageManager(Device.adb); + const list = await pm.listPackages(); + let result = await list.next(); + while (!result.done) { + var packageElem = document.createElement('li'); + packageElem.innerHTML = `${result.value.packageName}`; + /* packageElem.querySelector('input').onclick = (function(){ + // TODO: hide or show action buttons that do actions on selected elements if there is none or at least one + }); */ + $('ul$packageList$').appendChild(packageElem); + result = await list.next(); + } +} + +window.addEventListener('hashchange', (async function(){ + const sectionHash = location.hash.slice(2).split('/')[0]; + if (Device.adb && sectionHash === 'packages' /* && !$('ul$packageList$').innerHTML */) { + refreshPackagesList(); + } +})); })(); diff --git a/src/SpiderADB/holo-web/holo-base-elements.css b/source/SpiderADB/holo-web/holo-base-elements.css similarity index 100% rename from src/SpiderADB/holo-web/holo-base-elements.css rename to source/SpiderADB/holo-web/holo-base-elements.css diff --git a/src/SpiderADB/holo-web/holo-base-widgets.css b/source/SpiderADB/holo-web/holo-base-widgets.css similarity index 100% rename from src/SpiderADB/holo-web/holo-base-widgets.css rename to source/SpiderADB/holo-web/holo-base-widgets.css diff --git a/src/SpiderADB/holo-web/holo-extra-octt.css b/source/SpiderADB/holo-web/holo-extra-octt.css similarity index 95% rename from src/SpiderADB/holo-web/holo-extra-octt.css rename to source/SpiderADB/holo-web/holo-extra-octt.css index 5285c73..c850159 100644 --- a/src/SpiderADB/holo-web/holo-extra-octt.css +++ b/source/SpiderADB/holo-web/holo-extra-octt.css @@ -27,7 +27,7 @@ a[data-action-section] { /* width: 60%; */ height: 100vh; z-index: 1; - background: rgba(0, 0, 0, 0.5); + background: rgba(0, 0, 0, 0.6); } .holo-sidebar[data-open="open"], .holo-sideBar[data-open="open"] { @@ -37,7 +37,7 @@ a[data-action-section] { .holo-sidebar .holo-list, .holo-sideBar .holo-list { width: 60%; height: 100vh; - background: black; + background: rgba(0, 0, 0, 0.9); } .actionBar .holo-title.holo-menu, .holo-actionBar .holo-title.holo-menu { diff --git a/src/SpiderADB/holo-web/holo-extra-octt.js b/source/SpiderADB/holo-web/holo-extra-octt.js similarity index 73% rename from src/SpiderADB/holo-web/holo-extra-octt.js rename to source/SpiderADB/holo-web/holo-extra-octt.js index 078251e..5edd016 100644 --- a/src/SpiderADB/holo-web/holo-extra-octt.js +++ b/source/SpiderADB/holo-web/holo-extra-octt.js @@ -1,13 +1,17 @@ window.addEventListener('load', (function() { +var initialSectionName = $('[data-section][data-open]').dataset.section; + $('::[data-action-sidebar]').forEach(function(actionSidebarElem){ var sidebarElem = $('[data-sidebar="' + actionSidebarElem.dataset.actionSidebar + '"]'); - actionSidebarElem.onclick = sidebarElem.onclick = (function(){ + function toggleSidebar () { sidebarElem.dataset.open = (sidebarElem.dataset.open !== 'open' ? 'open' : false); - }); - sidebarElem.querySelector('.holo-list').onclick = (function(event){ + } + actionSidebarElem.addEventListener('click', toggleSidebar); + sidebarElem.addEventListener('click', toggleSidebar); + sidebarElem.querySelector('.holo-list').addEventListener('click', (function(event){ event.stopPropagation(); - }); + })); arrayFrom(sidebarElem.querySelectorAll('.holo-list li button, .holo-list li [role="button"]')).forEach(function(buttonElem){ buttonElem.addEventListener('click', (function(){ sidebarElem.dataset.open = false; @@ -40,9 +44,11 @@ function refreshDisplaySections (sectionTargetName) { } refreshDisplaySections(); -var sectionHash = location.hash.slice(2).split('/')[0]; -if (sectionHash) { - $(`[data-action-section="${sectionHash}"]`).click(); +function hashChange () { + var sectionHash = location.hash.slice(2).split('/')[0]; + $(`[data-action-section="${sectionHash || initialSectionName}"]`).click(); } +window.addEventListener('hashchange', hashChange); +hashChange(); })); diff --git a/src/SpiderADB/holo-web/holo-ics-dark-elements.css b/source/SpiderADB/holo-web/holo-ics-dark-elements.css similarity index 100% rename from src/SpiderADB/holo-web/holo-ics-dark-elements.css rename to source/SpiderADB/holo-web/holo-ics-dark-elements.css diff --git a/src/SpiderADB/holo-web/holo-ics-dark-widgets.css b/source/SpiderADB/holo-web/holo-ics-dark-widgets.css similarity index 100% rename from src/SpiderADB/holo-web/holo-ics-dark-widgets.css rename to source/SpiderADB/holo-web/holo-ics-dark-widgets.css diff --git a/src/SpiderADB/holo-web/holo-menu.png b/source/SpiderADB/holo-web/holo-menu.png similarity index 100% rename from src/SpiderADB/holo-web/holo-menu.png rename to source/SpiderADB/holo-web/holo-menu.png diff --git a/src/SpiderADB/holo-web/holo-touch.js b/source/SpiderADB/holo-web/holo-touch.js similarity index 100% rename from src/SpiderADB/holo-web/holo-touch.js rename to source/SpiderADB/holo-web/holo-touch.js diff --git a/src/SpiderADB/index.html b/source/SpiderADB/index.html similarity index 52% rename from src/SpiderADB/index.html rename to source/SpiderADB/index.html index a2f02de..8242663 100644 --- a/src/SpiderADB/index.html +++ b/source/SpiderADB/index.html @@ -14,8 +14,16 @@ @@ -26,6 +34,16 @@ + + +

- +
diff --git a/src/SpiderADB/package-lock.json b/source/SpiderADB/package-lock.json similarity index 89% rename from src/SpiderADB/package-lock.json rename to source/SpiderADB/package-lock.json index 3a870bf..5da2d38 100644 --- a/src/SpiderADB/package-lock.json +++ b/source/SpiderADB/package-lock.json @@ -8,6 +8,7 @@ "@yume-chan/adb": "^0.0.23", "@yume-chan/adb-credential-web": "^0.0.23", "@yume-chan/adb-daemon-webusb": "^0.0.23", + "@yume-chan/android-bin": "^0.0.23", "@yume-chan/stream-extra": "^0.0.23" } }, @@ -50,6 +51,17 @@ "tslib": "^2.6.2" } }, + "node_modules/@yume-chan/android-bin": { + "version": "0.0.23", + "resolved": "https://registry.npmjs.org/@yume-chan/android-bin/-/android-bin-0.0.23.tgz", + "integrity": "sha512-yOhErwfD7oe8piG/kboHbYGLQJU/eJE81yUzQFJbXtI0guR8j9baeyVYuTHzSVyvFTlBqsd5cd68bYGT6o3yAw==", + "dependencies": { + "@yume-chan/adb": "^0.0.23", + "@yume-chan/stream-extra": "^0.0.23", + "@yume-chan/struct": "^0.0.23", + "tslib": "^2.6.2" + } + }, "node_modules/@yume-chan/async": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@yume-chan/async/-/async-2.2.0.tgz", diff --git a/src/SpiderADB/package.json b/source/SpiderADB/package.json similarity index 82% rename from src/SpiderADB/package.json rename to source/SpiderADB/package.json index c6d95cf..697f9d3 100644 --- a/src/SpiderADB/package.json +++ b/source/SpiderADB/package.json @@ -3,6 +3,7 @@ "@yume-chan/adb": "^0.0.23", "@yume-chan/adb-credential-web": "^0.0.23", "@yume-chan/adb-daemon-webusb": "^0.0.23", + "@yume-chan/android-bin": "^0.0.23", "@yume-chan/stream-extra": "^0.0.23" } } diff --git a/src/SpiderADB/util.js b/source/SpiderADB/util.js similarity index 100% rename from src/SpiderADB/util.js rename to source/SpiderADB/util.js diff --git a/src/WuppiMini/.gitignore b/source/WuppiMini/.gitignore similarity index 100% rename from src/WuppiMini/.gitignore rename to source/WuppiMini/.gitignore diff --git a/src/WuppiMini/Build.sh b/source/WuppiMini/Build.sh similarity index 100% rename from src/WuppiMini/Build.sh rename to source/WuppiMini/Build.sh diff --git a/src/WuppiMini/Requirements.sh b/source/WuppiMini/Requirements.sh similarity index 100% rename from src/WuppiMini/Requirements.sh rename to source/WuppiMini/Requirements.sh diff --git a/src/WuppiMini/index.js b/source/WuppiMini/index.js similarity index 99% rename from src/WuppiMini/index.js rename to source/WuppiMini/index.js index 945fde1..2c7d05b 100755 --- a/src/WuppiMini/index.js +++ b/source/WuppiMini/index.js @@ -260,6 +260,7 @@ const endpointInfo = [ (ctx) => (ctx.urlSections[0] === 'info' && ctx.request.me ${isEnvServer ? `You can obtain the full source code and assets by downloading the following files: ${resFiles.map((file) => ` β€’ ${file}`).join('')}. ` : 'To get the original, unminified source code, visit this same page on the server-side version (refer to the Versions section above).'} + Alternatively, you can also find the source code on my shared Git repo: ${A('https://gitlab.com/octospacc/octospacc.gitlab.io/-/tree/master/source/WuppiMini/')}.

${isEnvServer ? `

Terms of Use and Privacy Policy

${appTerms}` : ''}

Changelog

diff --git a/src/WuppiMini/package-lock.json b/source/WuppiMini/package-lock.json similarity index 100% rename from src/WuppiMini/package-lock.json rename to source/WuppiMini/package-lock.json diff --git a/src/WuppiMini/package.json b/source/WuppiMini/package.json similarity index 100% rename from src/WuppiMini/package.json rename to source/WuppiMini/package.json diff --git a/public/Assets/CSS/Dark.css b/static/Assets/CSS/Dark.css similarity index 100% rename from public/Assets/CSS/Dark.css rename to static/Assets/CSS/Dark.css diff --git a/public/Assets/CSS/Font_F25_Bank_Printer.css b/static/Assets/CSS/Font_F25_Bank_Printer.css similarity index 100% rename from public/Assets/CSS/Font_F25_Bank_Printer.css rename to static/Assets/CSS/Font_F25_Bank_Printer.css diff --git a/public/Assets/Fonts/F25_Bank_Printer.woff2 b/static/Assets/Fonts/F25_Bank_Printer.woff2 similarity index 100% rename from public/Assets/Fonts/F25_Bank_Printer.woff2 rename to static/Assets/Fonts/F25_Bank_Printer.woff2 diff --git a/public/Assets/JS/CurrentAge.js b/static/Assets/JS/CurrentAge.js similarity index 100% rename from public/Assets/JS/CurrentAge.js rename to static/Assets/JS/CurrentAge.js diff --git a/public/Assets/JS/CurrentAgeRenderIndex.js b/static/Assets/JS/CurrentAgeRenderIndex.js similarity index 100% rename from public/Assets/JS/CurrentAgeRenderIndex.js rename to static/Assets/JS/CurrentAgeRenderIndex.js diff --git a/public/Assets/JS/RandomGIF.js b/static/Assets/JS/RandomGIF.js similarity index 100% rename from public/Assets/JS/RandomGIF.js rename to static/Assets/JS/RandomGIF.js diff --git a/public/Assets/Lib/Trasformapi.js b/static/Assets/Lib/Trasformapi.js similarity index 100% rename from public/Assets/Lib/Trasformapi.js rename to static/Assets/Lib/Trasformapi.js diff --git a/public/Assets/Lib/cleanHTML.js b/static/Assets/Lib/cleanHTML.js similarity index 100% rename from public/Assets/Lib/cleanHTML.js rename to static/Assets/Lib/cleanHTML.js diff --git a/public/Assets/Lib/defiant.min.js b/static/Assets/Lib/defiant.min.js similarity index 100% rename from public/Assets/Lib/defiant.min.js rename to static/Assets/Lib/defiant.min.js diff --git a/public/Assets/Lib/lodash.custom.min.js b/static/Assets/Lib/lodash.custom.min.js similarity index 100% rename from public/Assets/Lib/lodash.custom.min.js rename to static/Assets/Lib/lodash.custom.min.js diff --git a/public/Collections/index.html b/static/Collections/index.html similarity index 100% rename from public/Collections/index.html rename to static/Collections/index.html diff --git a/public/Ecoji/index.html b/static/Ecoji/index.html similarity index 100% rename from public/Ecoji/index.html rename to static/Ecoji/index.html diff --git a/public/FramesBrowser/index.html b/static/FramesBrowser/index.html similarity index 100% rename from public/FramesBrowser/index.html rename to static/FramesBrowser/index.html diff --git a/public/FramesBrowser/manifest.json b/static/FramesBrowser/manifest.json similarity index 100% rename from public/FramesBrowser/manifest.json rename to static/FramesBrowser/manifest.json diff --git a/public/HashyMagnet/Bubbles.css b/static/HashyMagnet/Bubbles.css similarity index 100% rename from public/HashyMagnet/Bubbles.css rename to static/HashyMagnet/Bubbles.css diff --git a/public/HashyMagnet/index.html b/static/HashyMagnet/index.html similarity index 100% rename from public/HashyMagnet/index.html rename to static/HashyMagnet/index.html diff --git a/public/HashyMagnet/manifest.json b/static/HashyMagnet/manifest.json similarity index 100% rename from public/HashyMagnet/manifest.json rename to static/HashyMagnet/manifest.json diff --git a/public/MBViewer/babel.config.json b/static/MBViewer/babel.config.json similarity index 100% rename from public/MBViewer/babel.config.json rename to static/MBViewer/babel.config.json diff --git a/public/MBViewer/css/MBViewer.css b/static/MBViewer/css/MBViewer.css similarity index 100% rename from public/MBViewer/css/MBViewer.css rename to static/MBViewer/css/MBViewer.css diff --git a/public/MBViewer/css/print.css b/static/MBViewer/css/print.css similarity index 100% rename from public/MBViewer/css/print.css rename to static/MBViewer/css/print.css diff --git a/public/MBViewer/css/telegram-web.css b/static/MBViewer/css/telegram-web.css similarity index 100% rename from public/MBViewer/css/telegram-web.css rename to static/MBViewer/css/telegram-web.css diff --git a/public/MBViewer/css/widget-frame.css b/static/MBViewer/css/widget-frame.css similarity index 100% rename from public/MBViewer/css/widget-frame.css rename to static/MBViewer/css/widget-frame.css diff --git a/public/MBViewer/img/tgme/pattern.svg b/static/MBViewer/img/tgme/pattern.svg similarity index 100% rename from public/MBViewer/img/tgme/pattern.svg rename to static/MBViewer/img/tgme/pattern.svg diff --git a/public/MBViewer/index.html b/static/MBViewer/index.html similarity index 100% rename from public/MBViewer/index.html rename to static/MBViewer/index.html diff --git a/public/MBViewer/js/MBViewer.js b/static/MBViewer/js/MBViewer.js similarity index 100% rename from public/MBViewer/js/MBViewer.js rename to static/MBViewer/js/MBViewer.js diff --git a/public/MBViewer/js/TrasformapiSchema.xml.js b/static/MBViewer/js/TrasformapiSchema.xml.js similarity index 100% rename from public/MBViewer/js/TrasformapiSchema.xml.js rename to static/MBViewer/js/TrasformapiSchema.xml.js diff --git a/public/MBViewer/js/jquery-ui.min.js b/static/MBViewer/js/jquery-ui.min.js similarity index 100% rename from public/MBViewer/js/jquery-ui.min.js rename to static/MBViewer/js/jquery-ui.min.js diff --git a/public/MBViewer/js/jquery.min.js b/static/MBViewer/js/jquery.min.js similarity index 100% rename from public/MBViewer/js/jquery.min.js rename to static/MBViewer/js/jquery.min.js diff --git a/public/MBViewer/js/telegram-web.js b/static/MBViewer/js/telegram-web.js similarity index 100% rename from public/MBViewer/js/telegram-web.js rename to static/MBViewer/js/telegram-web.js diff --git a/public/MBViewer/js/tgsticker.js b/static/MBViewer/js/tgsticker.js similarity index 100% rename from public/MBViewer/js/tgsticker.js rename to static/MBViewer/js/tgsticker.js diff --git a/public/MBViewer/js/tgwallpaper.min.js b/static/MBViewer/js/tgwallpaper.min.js similarity index 100% rename from public/MBViewer/js/tgwallpaper.min.js rename to static/MBViewer/js/tgwallpaper.min.js diff --git a/public/MBViewer/js/widget-frame.js b/static/MBViewer/js/widget-frame.js similarity index 100% rename from public/MBViewer/js/widget-frame.js rename to static/MBViewer/js/widget-frame.js diff --git a/public/MatrixStickerHelper/0nkwC9f7MfsBiWcLtY65AWDK873ljiK-.ttf b/static/MatrixStickerHelper/0nkwC9f7MfsBiWcLtY65AWDK873ljiK-.ttf similarity index 100% rename from public/MatrixStickerHelper/0nkwC9f7MfsBiWcLtY65AWDK873ljiK-.ttf rename to static/MatrixStickerHelper/0nkwC9f7MfsBiWcLtY65AWDK873ljiK-.ttf diff --git a/public/MatrixStickerHelper/NeuchaPatrickHandSC.css b/static/MatrixStickerHelper/NeuchaPatrickHandSC.css similarity index 100% rename from public/MatrixStickerHelper/NeuchaPatrickHandSC.css rename to static/MatrixStickerHelper/NeuchaPatrickHandSC.css diff --git a/public/MatrixStickerHelper/gifskiWasm.mjs b/static/MatrixStickerHelper/gifskiWasm.mjs similarity index 100% rename from public/MatrixStickerHelper/gifskiWasm.mjs rename to static/MatrixStickerHelper/gifskiWasm.mjs diff --git a/public/MatrixStickerHelper/gifski_wasm_bg.wasm b/static/MatrixStickerHelper/gifski_wasm_bg.wasm similarity index 100% rename from public/MatrixStickerHelper/gifski_wasm_bg.wasm rename to static/MatrixStickerHelper/gifski_wasm_bg.wasm diff --git a/public/MatrixStickerHelper/index.html b/static/MatrixStickerHelper/index.html similarity index 100% rename from public/MatrixStickerHelper/index.html rename to static/MatrixStickerHelper/index.html diff --git a/public/MatrixStickerHelper/paper.min.css b/static/MatrixStickerHelper/paper.min.css similarity index 100% rename from public/MatrixStickerHelper/paper.min.css rename to static/MatrixStickerHelper/paper.min.css diff --git a/public/MatrixStickerHelper/q5uGsou0JOdh94bfvQlo.ttf b/static/MatrixStickerHelper/q5uGsou0JOdh94bfvQlo.ttf similarity index 100% rename from public/MatrixStickerHelper/q5uGsou0JOdh94bfvQlo.ttf rename to static/MatrixStickerHelper/q5uGsou0JOdh94bfvQlo.ttf diff --git a/public/MatrixStickerHelper/telegram.js b/static/MatrixStickerHelper/telegram.js similarity index 100% rename from public/MatrixStickerHelper/telegram.js rename to static/MatrixStickerHelper/telegram.js diff --git a/public/MatrixStickerHelper/tgs-player.js b/static/MatrixStickerHelper/tgs-player.js similarity index 100% rename from public/MatrixStickerHelper/tgs-player.js rename to static/MatrixStickerHelper/tgs-player.js diff --git a/public/RichPreview/FumoPrisms.jpg b/static/RichPreview/FumoPrisms.jpg similarity index 100% rename from public/RichPreview/FumoPrisms.jpg rename to static/RichPreview/FumoPrisms.jpg diff --git a/public/RichPreview/index.jpg b/static/RichPreview/index.jpg similarity index 100% rename from public/RichPreview/index.jpg rename to static/RichPreview/index.jpg diff --git a/public/ServiceWorker.js b/static/ServiceWorker.js similarity index 100% rename from public/ServiceWorker.js rename to static/ServiceWorker.js diff --git a/public/Userscripts/index.html b/static/Userscripts/index.html similarity index 100% rename from public/Userscripts/index.html rename to static/Userscripts/index.html diff --git a/public/favicon.png b/static/favicon.png similarity index 100% rename from public/favicon.png rename to static/favicon.png diff --git a/public/index.html b/static/index.html similarity index 94% rename from public/index.html rename to static/index.html index 9e67e99..97bb2e0 100644 --- a/public/index.html +++ b/static/index.html @@ -48,27 +48,31 @@ -->🧲 HashyMagnet (BitTorrent Hash to Magnet) -

🦜 Ecoji v1 - (webapp fork)

πŸͺŸοΈ Frames Browser (yo dawg, i heard you...)

πŸƒοΈ [Matrix] Sticker Helper

πŸ‘οΈβ€πŸ—¨οΈοΈ MBViewer - (WordPress/RSS/... chat-like UI)πŸ•·οΈ SpiderADB + (Android debugging for Web)

☘️ WuppìMini (basic-HTML posting client)

+

πŸ‘οΈβ€πŸ—¨οΈοΈ MBViewer + (WordPress/RSS/... chat-like UI)

+

🦜 Ecoji v1 + (webapp fork)


-

πŸ”ΊοΈ Fumo Prisms (!)

+

πŸ”ΊοΈ Fumo Prisms (!)

πŸŽ€ My Collections (of posts/pages)

-

βš™οΈ My Userscripts

+

βš™οΈ My Userscripts for a nicer web

Nice 🦊 Firefox Add-ons (mine + suggestions)

diff --git a/public/robots.txt b/static/robots.txt similarity index 100% rename from public/robots.txt rename to static/robots.txt diff --git a/public/stuff/embed.octo.whixard.tech.html b/static/stuff/embed.octo.whixard.tech.html similarity index 100% rename from public/stuff/embed.octo.whixard.tech.html rename to static/stuff/embed.octo.whixard.tech.html diff --git a/public/stuff/links/LinuxGore.html b/static/stuff/links/LinuxGore.html similarity index 100% rename from public/stuff/links/LinuxGore.html rename to static/stuff/links/LinuxGore.html diff --git a/public/stuff/links/embeds/LinuxGore.png b/static/stuff/links/embeds/LinuxGore.png similarity index 100% rename from public/stuff/links/embeds/LinuxGore.png rename to static/stuff/links/embeds/LinuxGore.png diff --git a/public/stuff/links/embeds/octokek.jpg b/static/stuff/links/embeds/octokek.jpg similarity index 100% rename from public/stuff/links/embeds/octokek.jpg rename to static/stuff/links/embeds/octokek.jpg diff --git a/public/stuff/links/octokek.html b/static/stuff/links/octokek.html similarity index 100% rename from public/stuff/links/octokek.html rename to static/stuff/links/octokek.html diff --git a/public/stuff/locked-tgreact.html b/static/stuff/locked-tgreact.html similarity index 100% rename from public/stuff/locked-tgreact.html rename to static/stuff/locked-tgreact.html diff --git a/public/stuff/octo.whixard.tech.html b/static/stuff/octo.whixard.tech.html similarity index 100% rename from public/stuff/octo.whixard.tech.html rename to static/stuff/octo.whixard.tech.html