From 3215d2ddd9a59de55dd36ee8bc720e1d58d2eaed Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Thu, 27 Mar 2025 23:22:42 +0100 Subject: [PATCH 1/3] format document --- index.html | 269 ++++++++++++++++++++++++++++------------------------- 1 file changed, 143 insertions(+), 126 deletions(-) diff --git a/index.html b/index.html index 1400a55..6c053e8 100644 --- a/index.html +++ b/index.html @@ -1,133 +1,150 @@ - - - - - - - - - - - - - - - - - - -
- - -
- - -
- - -
- - -
- - -
- - - - - -
- - -
- - -
- - -
- - - - -
- - - - + + + + + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + + + + +
+ + +
+ + +
+ + +
+ + + + +
+ + + + -
-
-

DNS Prefetch

-
-
-
-

Usage instructions:

-
    -
  1. - Navigate to - https://dig.pm/ - and click Get Sub Domain. -
  2. -
  3. Input the subdomain from Step 1.
  4. -
  5. Click all 3 of the buttons.
  6. -
  7. Click Get Results on https://dig.pm/.
  8. -
  9. Observe the DNS lookup record.
  10. -
-

- Also see - the audit - and - the blog post. -

-
-

You can also utilize Wireshark, then https://dig.pm/ is not needed.

- -
- -
- -
- -
- -
-
- - -
-

Webxdc Status Update Tests

- -
- - - - -
- - +
+
+

DNS Prefetch

+
+
+
+

Usage instructions:

+
    +
  1. + Navigate to + https://dig.pm/ + and click Get Sub Domain. +
  2. +
  3. Input the subdomain from Step 1.
  4. +
  5. Click all 3 of the buttons.
  6. +
  7. Click Get Results on https://dig.pm/.
  8. +
  9. Observe the DNS lookup record.
  10. +
+

+ Also see + the audit + and + the blog post. +

+
+

+ You can also utilize Wireshark, then https://dig.pm/ is not needed. +

+ +
+ +
+ +
+ +
+ +
+
+ + +
+

Webxdc Status Update Tests

+ +
+ + + + +
+ + From b11e0ad222cae122f5fed3cdc2ff8e37db7b1545 Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Fri, 28 Mar 2025 00:14:39 +0100 Subject: [PATCH 2/3] make tabs --- index.html | 270 ++++++++++++++++++++++++++++++----------------------- js/info.js | 4 +- styles.css | 44 +++++++++ 3 files changed, 197 insertions(+), 121 deletions(-) diff --git a/index.html b/index.html index 6c053e8..cf314bc 100644 --- a/index.html +++ b/index.html @@ -24,127 +24,159 @@ -
- - -
- - -
- - -
- - -
- - -
- - - - - -
- - -
- - -
- - -
- - - - -
- - - - -
-
-

DNS Prefetch

-
-
-
-

Usage instructions:

-
    -
  1. - Navigate to - https://dig.pm/ - and click Get Sub Domain. -
  2. -
  3. Input the subdomain from Step 1.
  4. -
  5. Click all 3 of the buttons.
  6. -
  7. Click Get Results on https://dig.pm/.
  8. -
  9. Observe the DNS lookup record.
  10. -
-

- Also see - the audit - and - the blog post. -

-
-

- You can also utilize Wireshark, then https://dig.pm/ is not needed. -

- -
- -
- -
- -
- +
+
+
+ +
+ +
+ +
+ + +
+

Webxdc Status Update Tests

+ +
+ + + + +
+
-
- - -
-

Webxdc Status Update Tests

-
- - Duplicated Status Updates Race Test - +
+
+ +
+ + + + +
+ + +
+ +
+
+
+ +
+ + + + +
+ + + + +
+
+

DNS Prefetch

+
+
+
+

Usage instructions:

+
    +
  1. + Navigate to + https://dig.pm/ + and click Get Sub Domain. +
  2. +
  3. Input the subdomain from Step 1.
  4. +
  5. Click all 3 of the buttons.
  6. +
  7. Click Get Results on https://dig.pm/.
  8. +
  9. Observe the DNS lookup record.
  10. +
+

+ Also see + the audit + and + the blog post. +

+
+

+ You can also utilize Wireshark, then https://dig.pm/ is not + needed. +

+ +
+ +
+ +
+ +
+ +
+
+
- - - - -
- +
+
Webxdc
+
Web API
+
Sandboxing
+
+ diff --git a/js/info.js b/js/info.js index 0f961eb..edef09b 100644 --- a/js/info.js +++ b/js/info.js @@ -2,8 +2,8 @@ window.addEventListener("load", () => { let container = h("div", {class: "container"}); // background is set to spot leading/trailing spaces errors - container.append(h("div", {}, "webxdc.selfName: ", h("span", {style: "background:#DDD;"}, webxdc.selfName))) - container.append(h("div", {}, "webxdc.selfAddr: ", h("span", {style: "background:#DDD;"}, webxdc.selfAddr))) + container.append(h("div", {}, "webxdc.selfName: ", h("span", {style: "background:#DDD;word-wrap: break-word;"}, webxdc.selfName))) + container.append(h("div", {}, "webxdc.selfAddr: ", h("span", {style: "background:#DDD;word-wrap: break-word;"}, webxdc.selfAddr))) container.append(h("div", {}, "webxdc.sendUpdateInterval: " + webxdc.sendUpdateInterval)) container.append(h("div", {}, "webxdc.sendUpdateMaxSize: " + webxdc.sendUpdateMaxSize)) diff --git a/styles.css b/styles.css index 879eb3e..d5db5f9 100644 --- a/styles.css +++ b/styles.css @@ -45,4 +45,48 @@ button { border-radius: 100%; display: inline-block; margin-right: 4px; +} + +html, body { + margin: 0; + padding: 0; +} + +body { + display: flex; + flex-direction: column; + height: 100vh; +} + +.pages { + overflow-y: scroll; + flex-grow: 1; +} + +.page { + margin: 10px; + display: none; +} + +.page.active { + display: block; +} + +.tabs { + display: flex; + background-color: white; + border-top: 1px solid gainsboro; + align-items: center; +} + +.tab { + flex-grow: 1; + height: 36px; + font-size: 1.3em; + text-align: center; + align-content: center; +} + +.tab.active { + background-color: lightgrey; } \ No newline at end of file From 757b1fe5b8ee65f15c72873778c3552a52049740 Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Fri, 28 Mar 2025 00:22:07 +0100 Subject: [PATCH 3/3] split link card into multiple cards for the different tabs --- index.html | 47 ++++++++++++++++++++++++++++----------------- js/iframe.js | 17 ++++++++++++++++ js/links.js | 25 +----------------------- js/webxdc-notify.js | 25 ++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 42 deletions(-) create mode 100644 js/iframe.js create mode 100644 js/webxdc-notify.js diff --git a/index.html b/index.html index cf314bc..002ecf2 100644 --- a/index.html +++ b/index.html @@ -44,8 +44,8 @@
- - +
+
@@ -63,6 +63,9 @@
+ + +
@@ -77,18 +80,26 @@ style="display: none" >
- - +
+
+

webrtc-sidechannel iframe

+
+ + +
+ +
+ -
+

DNS Prefetch

@@ -167,15 +178,15 @@

DNS Prefetch

tab: document.getElementById("tab-sandbox"), }, ]; - for (const {page, tab} of tabs) { + for (const { page, tab } of tabs) { tab.onclick = () => { - tabs.forEach(({page, tab}) => { - page.classList.remove("active") - tab.classList.remove("active") - }); - page.classList.add("active") - tab.classList.add("active") - } + tabs.forEach(({ page, tab }) => { + page.classList.remove("active"); + tab.classList.remove("active"); + }); + page.classList.add("active"); + tab.classList.add("active"); + }; } diff --git a/js/iframe.js b/js/iframe.js new file mode 100644 index 0000000..8262219 --- /dev/null +++ b/js/iframe.js @@ -0,0 +1,17 @@ +window.addEventListener("load", () => { + const ifrmExplain = h( + "p", + {}, + "iframe: should be blocked and not load https://delta.chat from Internet:" + ); + const ifrm = h("iframe", { src: "https://delta.chat" }); + ifrm.style.width = "100%"; + ifrm.style.height = "auto"; + + document + .getElementById("iframe-output") + .append( + createHeader("Loading website in iframe"), + h("div", { class: "container" }, ifrmExplain, ifrm) + ); +}); diff --git a/js/links.js b/js/links.js index 5f0c49c..355ba0c 100644 --- a/js/links.js +++ b/js/links.js @@ -9,30 +9,7 @@ window.addEventListener("load", () => { h("li", {}, h("a", {href: "chrome://crash"}, "chrome://crash")), ); - let btn1 = h("button", {}, "info with deep-link to internal page, no notify"); - btn1.onclick = () => { - window.webxdc.sendUpdate({ payload: "", info: "open page.html", href: "page.html" }, ""); - }; - ul.append(h("li", {}, btn1)); - - let btn2 = h("button", {}, "info and notify all with deep-link to internal page"); - btn2.onclick = () => { - window.webxdc.sendUpdate({ payload: "", info: "open page.html", href: "page.html", notify: {"*": "notify page.html"} }, ""); - }; - ul.append(h("li", {}, btn2)); - - let btn3 = h("button", {}, "info and notify all with deep-link to #links-output section"); - btn3.onclick = () => { - window.webxdc.sendUpdate({ payload: "", info: "open #links-output", href: "index.html#links-output", notify: {"*": "notify #links-output"} }, ""); - }; - ul.append(h("li", {}, btn3)); - - const ifrmExplain = h("p", {}, "iframe: should be blocked and not load https://delta.chat from Internet:"); - const ifrm = h("iframe", {src: "https://delta.chat"}); - ifrm.style.width = "100%"; - ifrm.style.height = "auto"; - document.getElementById("links-output").append( - createHeader("Links"), h("div", {class: "container"}, ul, ifrmExplain, ifrm) + createHeader("Links"), h("div", {class: "container"}, ul) ); }); diff --git a/js/webxdc-notify.js b/js/webxdc-notify.js new file mode 100644 index 0000000..5e59cf9 --- /dev/null +++ b/js/webxdc-notify.js @@ -0,0 +1,25 @@ +window.addEventListener("load", () => { + let ul = h("ul"); + + let btn1 = h("button", {}, "info with deep-link to internal page, no notify"); + btn1.onclick = () => { + window.webxdc.sendUpdate({ payload: "", info: "open page.html", href: "page.html" }, ""); + }; + ul.append(h("li", {}, btn1)); + + let btn2 = h("button", {}, "info and notify all with deep-link to internal page"); + btn2.onclick = () => { + window.webxdc.sendUpdate({ payload: "", info: "open page.html", href: "page.html", notify: {"*": "notify page.html"} }, ""); + }; + ul.append(h("li", {}, btn2)); + + let btn3 = h("button", {}, "info and notify all with deep-link to #links-output section"); + btn3.onclick = () => { + window.webxdc.sendUpdate({ payload: "", info: "open #links-output", href: "index.html#links-output", notify: {"*": "notify #links-output"} }, ""); + }; + ul.append(h("li", {}, btn3)); + + document.getElementById("webxdc-notify-output").append( + createHeader("Webxdc Notify"), h("div", {class: "container"}, ul) + ); +});