0

I'm trying to remove a div element "pagecountBlock" that hides the content once I view 5 pages on a website. I've followed several threads online to no avail, and am wondering how to make the css injected and applied on the website. Can someone tell me what I'm doing wrong here? Thanks.

manifest.json

{
    "name": "CollegeProwler Ad Hide",
    "description": "Hides Ads on CollegeProwler",
    "version": "1.0",
    "manifest_version": 2,
    "icons": {
        "24": "logo24.png",
        "128": "logo128.png"
    },
    "content_scripts": [ {
        "matches": ["http://collegeprowler.com/"], //where script should be injected
        "css": ["hideAd.css"], //the name of the file to be injected
        "js": ["hideAd.js"] //js script to inject css
    } ],
    "web_accessible_resources": ["hideAd.css"]
}

hideAd.css

div .pagecountBlock {
    display: none !important;
}

div .lockCount {
    display: none !important;
}

hideAd.js Taken from this thread

var style = document.createElement('link');
style.rel = 'stylesheet';
style.type = 'text/css';
style.href = chrome.extension.getURL('hideAd.css');
(document.head||document.documentElement).appendChild(style);
Community
  • 1
  • 1
ric.row
  • 505
  • 1
  • 6
  • 18
  • This isn't a website I mange. I just want to remove a "pay wall" that keeps bugging me to register. – ric.row Nov 28 '13 at 21:24
  • While the answer to this Q appears to be technically simple, it looks like you are trying to effectively steal from this site. It costs them money to provide the service you are using. They have the right to provide it on their terms -- including nag screens and ads. Kick them some dough, use a different site, or explain how this isn't theft of service. – Brock Adams Nov 28 '13 at 22:38
  • I already registered on their website. I'm doing this to learn about making Chrome extensions. – ric.row Nov 28 '13 at 23:21

0 Answers0