From 6f1cddd9c03566fe194be222ac336baf6824a2d7 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sat, 21 Jun 2025 08:54:53 -0700 Subject: Surfingkeys: Add keybinding to go to the root of the domain --- surfingkeys/home.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/surfingkeys/home.ts b/surfingkeys/home.ts index 0e81a66..eb0ebd5 100644 --- a/surfingkeys/home.ts +++ b/surfingkeys/home.ts @@ -40,6 +40,13 @@ api.mapkey('g', '#14Load new posts', function() { el.click(); }, { domain: /phanpy\.social/i }); +api.mapkey('g/', '#7Go to top of domain', function() { + const url = new URL(window.location.href); + url.search = ""; + url.pathname = "/"; + window.location.assign(url.href); +}); + api.mapkey('cc', '#13Capture current page', orgCapture); api.vunmap('t'); -- cgit v1.3-2-g0d8e