- Notifications
You must be signed in to change notification settings - Fork9
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
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
executeany javascript onany chromium tabs
- adds options page with
tabgod()
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}[]>{//}
having chatgpt and pi talk to each other
demo.mp4
searching same query on multiple search engines
- open extensions options page
- open devtools console
- use provided
tabgod()
function- choose execution targets by writing a filter function that willinclude/excluce tabs based on defined criteria
- write any js to execute in world of targeted tabs
tabgod((tab)=>tab.url.includes("example.org"),()=>document.body.style.background="pink",);
- 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
About
execute any javascript on any chromium tabs - cross-tab parallel execution