During work I spend a substantial amount of time hopping between our live site (kagi.com), our staging site (stage.kagi.com), and my local dev server (localhost:3000). Frequently I need to open the same page in two of the three. Coincidentally, my most-used bookmarks are probably
javascript:location.href=location.href.replace(/https?:\/\/((stage\.)?kagi\.com|localhost:3000)\//,%22http://localhost:3000/%22)
, on keyword kl (kagi local)javascript:location.href=location.href.replace(/https?:\/\/((stage\.)?kagi\.com|localhost:3000)\//,%22https://stage.kagi.com/%22)
, on keyword ks (kagi staging)javascript:location.href=location.href.replace(/https?:\/\/((stage\.)?kagi\.com|localhost:3000)\//,%22https://kagi.com/%22)
, on keyword k (kagi [live])Hopping between environments using C-l k {l,s,} RET has become a reflex, and opening a different environment's version of a page in a new tab (C-l C-c C-t C-v RET C-l k {l,s,} RET) is a slightly more convoluted reflex.
Published 2025-02-15