sdevn / tabgod

execute any javascript from any browser tab on any browser tabs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


tabgod

execute any javascript from any browser tab on any browser tabs

what you get in all devtools consoles:

async function tabgod(
  tabFilterFunc: (tab: chrome.tabs.Tab) => boolean,
  exeFunc: () => unknown
): Promise<unknown[]> {
  //
}

example:

await tabgod(
  (tab) => tab.url.includes("example.org"),
  () => (document.querySelector("h1").innerText = "tabgod")
)

installation

  • clone repo
  • goto your-chromium-based-browser://extensions/
    • example: arc://extensions/
  • make sure to have 'Developer mode' enabled
  • 'Load unpacked' choose path to ./dist of repo

usage

  1. choose execution targets by writing a filter function that will include/excluce tabs based on defined criteria
  2. write any js to execute in world of targeted tabs
await tabgod(
  (tab) => {
    return tab.url.includes("example.org")
  },
  () => {
    document.body.style.background = "pink"
  }
)

About

execute any javascript from any browser tab on any browser tabs

License:The Unlicense


Languages

Language:TypeScript 100.0%