Jump to content

imothep85

Members
  • Posts

    1
  • Joined

  • Last visited

imothep85's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. hi to all i made a chrome extension, it works perfeclty. BUT i have a little problem and i don't know how to solve that. this is my script inside the "background.js" file: var AUTHORIZED_DOMAINS= {"siteporno.com": false,"www.siteporno.com": false};function extract_domain(url) { var matches = url.match(/^https?://([^/?#]+)(?:[/?#]|$)/i); return matches[1];} chrome.webRequest.onBeforeRequest.addListener(function(details) { var domain = extract_domain(details.url);return { cancel: AUTHORIZED_DOMAINS[domain ]===false }; }, {urls: ["<all_urls>"]},["blocking"]); My problem is this one, it block bad urls like porn websites, i have a list with some thousands urls,who are blocked. BUT when i try to block some new urls from twitter my script don't block those urls. this is the url of twitter: https://twitter.com/ and for example if i want to block "twitter.com/AlissaMaree1" my script don't work, and i need to solve that quickly. can people help me to solve that problem?? THANKS
×
×
  • Create New...