diff --git a/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/href/onclick b/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/href/onclick new file mode 100755 index 0000000..851ae48 --- /dev/null +++ b/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/href/onclick @@ -0,0 +1,13 @@ +#!/usr/bin/awk -f +BEGIN{ + href=ARGV[1] + + if( match(href,/\.glb[#?]?/) ){ + + print( "" ) > "/root/index.html" + + }else{ + + system("js 'window.open(\"" href "\")'" ) + } +} diff --git a/buildroot-v86/board/v86/rootfs_overlay/root/manual.md b/buildroot-v86/board/v86/rootfs_overlay/root/manual.md index d1af2c3..e00828c 100644 --- a/buildroot-v86/board/v86/rootfs_overlay/root/manual.md +++ b/buildroot-v86/board/v86/rootfs_overlay/root/manual.md @@ -183,15 +183,12 @@ https://127.0.0.1 (instead of https://localhost) because the latter cripples the ## webrequests to the filesystem -Javascript webrequests can read from the filesystem via the 'file://host/path' protocol: +Javascript webrequests can read from the filesystem: ``` -fetch("file://xrsh/mnt/profile.browser") +fetch("/mnt/profile.browser") ``` - - NOTE: it's `file://xrsh` not `file:///` (basically it includes host `xrsh`) to prevent the browser security-model from blocking the request (and select the xrsh filesystem, not the native filesystem). - current [security] limitations: * only /mnt directory is exposed