Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

execute any javascript on any chromium tabs - cross-tab parallel execution

License

NotificationsYou must be signed in to change notification settings

devidw/tabgod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

executeany javascript onany chromium tabs

  • adds options page withtabgod() function
asyncfunctiontabgod(tabFilterFunc:(tab:chrome.tabs.Tab, ...args:unknown[])=>boolean,exeFunc:(...args:unknown[])=>unknown,options?:{tabFilterArgs?:unknown[];exeArgs?:unknown[];evalAdd?:string;},):Promise<{tabId:number;result:unknown}[]>{//}

examples

having chatgpt and pi talk to each other

demo.mp4

searching same query on multiple search engines

usage

  1. open extensions options page
  2. open devtools console
  3. use providedtabgod() function
    1. choose execution targets by writing a filter function that willinclude/excluce tabs based on defined criteria
    2. write any js to execute in world of targeted tabs
tabgod((tab)=>tab.url.includes("example.org"),()=>document.body.style.background="pink",);

notes on first release

  • initial idea was to make tabgod function available in all devtools consolesfor easy and direct access for developers right from every console
  • the implementation added tabgod to the global window object
  • however this introduced a serious security issue, since this has made thefunction available to websites also, allowing them to interact with other tabs,destroying the idea of secure tab origins
  • thanks todanielsmc pointing it out
  • this has been immediately addressed by moving the function only to the optionspage of the extension, and not accepting external connections in the serviceworker

[8]ページ先頭

©2009-2025 Movatter.jp