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);