How can firefox extension detect the content type of a page?
since my pageload extension fires even when I view the css or js files, I want to add another validation that only triggers my extension when the current page content type is text / html.
//eg: at my page load handler
function onPageload(){
// only want to proceed if content-type reflects a text/html or */html page
if ( contentTypeIsHtml() ){
//continue here
}
}
what should contentTypeIsHtml () do?
+2
a source to share
2 answers