Answer the question
In order to leave comments, you need to log in
How to distinguish a web request from a regular page from a request from the extension itself from a Chrome/Opera extension?
Intercepting a webRequest
by calling chrome.webRequest.onBeforeSendHeaders.addListener()
Answer the question
In order to leave comments, you need to log in
If you do so - as written above
$str = "Њ®бЄў , Њ®бЄў , „¬Ёва®ўбЄЁ© Їа®Ґ§¤, 1Ѓ (¬. „¬Ёва®ўбЄ п)";
echo iconv("CP1251", "UTF-8", $str );
then you need to consider what exactly this file you have in what encoding? to prevent double decoding. Save the string to a separate file exactly with 1251 encoding, then read its contents using file_get_contents and only then do iconv.
In the handler, get details.tabId, if it is -1 then the request was made not from the browser tab.
More here: https://developer.chrome.com/extensions/webRequest...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question