purevtsooj

Chrome Extension - Blocking

Jun 5th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. chrome.webRequest.onBeforeRequest.addListener(function(details) {
  2.     var url = details.url;
  3.     var type = details.type;
  4.  
  5.     if( url.indexOf('/css/base.css')>=0 ){
  6.         return { cancel: true }
  7.     }
  8.    
  9.     return { cancel: false }
  10. },
  11. {
  12.     urls: ["<all_urls>"]
  13.     // urls: ["https://*.domain.com/*", "https://testy/*"]
  14. },
  15. ["blocking"]
  16. );
Advertisement
Add Comment
Please, Sign In to add comment