3

Google 크롬에서 내 확장 프로그램이 감지되면 확장 프로그램 정보가 포함 된 탭을 열려고합니다.Google 크롬 확장 자바 스크립트

는 여기에 지금까지 생각이 무엇 있지만 고급의

chrome.runtime.onInstalled.addListener(function(details){ 
    if(details.reason == "install"){ 
     alert('This is the first run!'); 
     chrome.extension.onRequest.addListener(function(request, sender) { 
    chrome.tabs.update(sender.tab.id, {url: request.redirect}); 
}); 
    }else if(details.reason == "update"){ 
     var thisVersion = chrome.runtime.getManifest().version; 
     alert('This is the update!'); 
    } 
}); 

감사를 작동하지 않는 것!

은 /// 솔루션은

내가 지금 여기가 내 자신의 대답을 게시 할만큼 충분히 높은 담당자가없는 ...

나는이 문제를 해결하기 위해 관리 ///.

chrome.runtime.onInstalled.addListener(function(details){ 
    if(details.reason == "install"){ 
     alert('This is the first run!'); 
      window.open("firstrun.html"); 
    }else if(details.reason == "update"){ 
     var thisVersion = chrome.runtime.getManifest().version; 
     alert('This is the update!'); 
    } 
}); 

window.open("firstrun.html");을 사용하면 확장 프로그램을 처음 설치할 때 Google 크롬에 새 탭이 열립니다.

다른 사람들에게 도움이되기를 바랍니다.

+0

작동? – Lee

답변

1

경보 업무를 수행 이걸 사용하고 완벽하게

chrome.runtime.onInstalled.addListener(function(details){ 
    if(details.reason == "install"){ 
     chrome.tabs.create({ url: chrome.extension.getURL('welcome.html')}); 
    } 
}); 
관련 문제