0
I have a silly problem, but I can’t solve it.
Come on:
I want to adapt this code
var pattern=/\bBloqueado/;
var viewtext = "http://www.google.com";
var newurl;
if (pattern.test(window.document.title))
{
newurl = viewtext;
chrome.extension.sendRequest({redirect: newurl});
}
It sees if the page title is spelled "Blocked" and if it is redirected to http://www.google.com
I need something to check if the Url is exactly google.com and if you’re going to redirect to google.com and if it’s google.com stop and do nothing.
Someone can help me?
Good afternoon, so that the snippet if the code only runs on extensions?
– Guilherme Nascimento