0
현재 URL에 특정 문자열이 포함되어 있으면 스크립트를 웹 페이지에 삽입하려고합니다. tab.url.indexOf가 URL에 특정 문자열이 포함되어 있는지 확인합니다.
웹 페이지
난에이 작업을 수행하기 위해 노력하고있어 :http://s128-en.ogame.gameforge.com/game/index.php?page=galaxy
background.js는 스크립트를 주입 결코 어떤 이유
chrome.tabs.onUpdated.addListener(function(id, info, tab){
if (tab.status !== "complete"){
return;
}
if(tab.url.indexOf("galaxy") != -1){
chrome.tabs.executeScript(tab.id, {"file": "findtarget.js"});
console.log("injected");
}
});
. 내가 여기서 무엇을 놓치고 있니?