Google Chrome have option to disable flash and java and only run them on user click, how to create extension that will do this?
相关问题
- how to get selected text from iframe with javascri
- How do you scroll an iframe from within using jque
- How does same-domain policy apply to background sc
- Is there any way to make the background of a 3D-mo
- Iframe scrollbar align to right
相关文章
- iframe的里内容看不到,但却点得到
- iframe content disappears on Firefox
- Changing an IFrames InnerHtml from codebehind
- Progressive web app(PWA) vs Electron vs Browser ex
- Scrolling issues with ExtJS 5 app inside IFrame
- iframe not reading cookies in Chrome
- chrome.runtime.getURL vs. chrome.extension.getURL
- Does html5 local storage store per iframe?
Just try adblock or disable the desired content under chrome://settings/content
You can implement this feature using the
onBeforeRequest
event of thewebRequest
API. Create a filter withtype: ['sub_frame']
, and extraInfoSpec['blocking']
. Then, return{cancel:true}
in the event listener.Minimal example:
Manifest file:
webRequest
permission is needed to enable the API.webRequestBlocking
permission is needed to make the request handling synchronous, to enable the function to modify (cancel) the request.*://*/*
permission is needed to allow access to the host