function Tell(backgroundType, content) { try { if (content == undefined) { chrome.runtime.sendMessage({ type: backgroundType }); } else { chrome.runtime.sendMessage({ type: backgroundType, content: content }); } } catch (error) { console.log(error); window.location.href = Host; } } try { if (condition == undefined) { condition = function () { return true; }; } } catch (error) { condition = function () { return true; }; } var href = window.location.href; var content = ""; if(document.contentType == "application/json") { content = document.documentElement.innerText; } else { content = document.documentElement.innerHTML; } if (condition()) { Tell("content", content); } else { Tell("notwant", content); }