how can a firefox extension detect content-type of the page loaded ?
Posted
by bosky101
on Stack Overflow
See other posts from Stack Overflow
or by bosky101
Published on 2010-05-17T09:05:50Z
Indexed on
2010/05/17
9:10 UTC
Read the original article
Hit count: 250
since my extension's pageload is triggered even when I view css or js files, i want to add another check that triggers my extension only when the current page's 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 ?
© Stack Overflow or respective owner