diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index 2574cad..1148a07 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -1,15 +1,15 @@ export default { - title: "onlinetool.io", - description: "Documentation for onlintool.io tools", + title: "tools.arslexis.io", + description: "Documentation for tools.arslexis.io", cleanUrls: true, base: "/docs/", srcDir: "./markdown", outDir: "../dist/docs", themeConfig: { - siteTitle: "onlinetool.io", + siteTitle: "tools.arslexis.io", editLink: { - pattern: "https://github.com/kjk/onlinetool/edit/main/docs/:path", + pattern: "https://github.com/kjk/tools.arslexis.io/edit/main/docs/:path", }, sidebar: [ { diff --git a/docs/markdown/gist-editor.md b/docs/markdown/gist-editor.md index 9d9411a..a4ba430 100644 --- a/docs/markdown/gist-editor.md +++ b/docs/markdown/gist-editor.md @@ -1,6 +1,6 @@ # Gist Editor -[Gist Editor](https://onlinetool.io/gisteditor/) is a better editor / manager for GitHub Gists. +[Gist Editor](https://tools.arslexis.io/gisteditor/) is a better editor / manager for GitHub Gists. Log in with GitHub to: * edit existing gists diff --git a/docs/markdown/index.md b/docs/markdown/index.md index d9eccd9..f77dfc6 100644 --- a/docs/markdown/index.md +++ b/docs/markdown/index.md @@ -1,6 +1,6 @@ -# onlinetool.io +# tools.arslexis.io -[onlinetool.io](https://onlinetool.io) is a collection of useful tools in the browser: +[tools.arslexis.io](https://tools.arslexis.io) is a collection of useful tools in the browser: * notepad2 : a lightweight (but capable) text / code editor. A web-based clone of notepad2 editor for Windows * Gist Editor : better editor / manager for GitHub gists diff --git a/docs/markdown/notepad2-differences.md b/docs/markdown/notepad2-differences.md index a573fa0..37e8863 100644 --- a/docs/markdown/notepad2-differences.md +++ b/docs/markdown/notepad2-differences.md @@ -7,4 +7,4 @@ Major reasons for differences: * differences between Scintilla editing component used by notepad2 and Code Mirror 6 editing component used by us * features that I haven't yet implemented -Feel free to [request features](https://github.com/kjk/onlinetool.io/labels/notepad2) that are most important to you. +Feel free to [request features](https://github.com/kjk/tools.arslexis.io/labels/notepad2) that are most important to you. diff --git a/docs/markdown/notepad2.md b/docs/markdown/notepad2.md index b07b58c..8aa7c30 100644 --- a/docs/markdown/notepad2.md +++ b/docs/markdown/notepad2.md @@ -1,6 +1,6 @@ # Notepad2 for web -[Notepad2 for web](https://onlinetool.io/notepad2/) is a web browser re-implementation of [notepad2](https://github.com/zufuliu/notepad2), a lightweight text / code editor for Windows. +[Notepad2 for web](https://tools.arslexis.io/notepad2/) is a web browser re-implementation of [notepad2](https://github.com/zufuliu/notepad2), a lightweight text / code editor for Windows. We try to faithfully recreate notepad2, within the limits of what's possible in the browser. diff --git a/frontend/package.json b/frontend/package.json index c563837..2b9191c 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,5 +1,5 @@ { - "name": "onlinetool.io", + "name": "tools.arslexis.io", "license": "UNLICENSED", "version": "0.1.0", "type": "module", diff --git a/frontend/src/Main.svelte b/frontend/src/Main.svelte index 95270f5..9b87001 100644 --- a/frontend/src/Main.svelte +++ b/frontend/src/Main.svelte @@ -9,7 +9,7 @@
@@ -17,7 +17,7 @@ @@ -207,19 +207,19 @@
Have feedback?
discuss
request features
report bugs
diff --git a/frontend/src/TopNav.svelte b/frontend/src/TopNav.svelte index b2e0651..f14ada7 100644 --- a/frontend/src/TopNav.svelte +++ b/frontend/src/TopNav.svelte @@ -3,7 +3,7 @@ import Twitter from "./icons/Twitter.svelte"; import GitHub from "./icons/GitHub.svelte"; - export let gitHubURL = "https://github.com/kjk/onlinetool.io"; + export let gitHubURL = "https://github.com/kjk/tools.arslexis.io";
@@ -17,7 +17,7 @@
diff --git a/frontend/src/events.js b/frontend/src/events.js index c8e2ab6..be5df2a 100644 --- a/frontend/src/events.js +++ b/frontend/src/events.js @@ -2,13 +2,36 @@ import { httpPostJSON } from "./httputil"; export let disableEvents = false; +/** + * @param {Object} o + */ +export function logEventRaw(o) { + fetch("/event", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(o), + }) + .then((response) => { + if (!response.ok) { + console.error("failed to log event:", response.statusText); + } else { + console.log("event logged:", o); + } + }) + .catch((err) => { + console.error("failed to log event:", err); + }); +} + export function logEvent(name, durMs = 0, meta = {}) { - if (disableEvents || window.location.host !== "onlinetool.io") { + if (disableEvents) { return; } if (durMs > 0) { meta.dur = durMs.toFixed(0); } - httpPostJSON(`/event/${name}`, meta); - // console.log(`ev '${name}' took ${durMs} ms`); + meta.name = name; + logEventRaw(meta); } diff --git a/frontend/src/gisteditor/About.svelte b/frontend/src/gisteditor/About.svelte index e591388..05baa47 100644 --- a/frontend/src/gisteditor/About.svelte +++ b/frontend/src/gisteditor/About.svelte @@ -30,7 +30,7 @@