javascript - How to get frame's current src using chrome extension? -
i have webpage contains 2 frames:top , main. main frame not under domain, , websites.
yes can $("#main").attr("src") reach "first" src, not "current" src.
and know it's not possible done javascript due security issue, thinking creating chrome extension it.
i tried content script, think can not because it's add js page.
is there offer advices? thx
i can answer part:
i tried content script, think can not because it's add js page.
you need set "all_frames": true
in manifest:
"content_scripts": [ { "js": [ "script.js" ], "matches": [ "http://*/*", "https://*/*" ], "all_frames": true } ],
this inject scripts each frame well.
Comments
Post a Comment