어떻게해야합니까? 나는 설명서를 읽었지 만 나는 단지 have icon, a tooltip, a badge, and a popup 만 찾을 수 있습니다. StumbleUpon과 유사한 툴바로 만들고 싶습니다. 그럼 ContentScripts를 사용하는 방법에 대해 생각하지만 주입에 html을 추가 해야할지 모르겠다 to the documentation 난 단지 js 또는 CSS의 옵션을 가지고 있기 때문에. 내가 여기서 무엇을 놓치고 있니?Chrome 용 StumbleUpon과 유사한 도구 모음 만들기
$("body").before('<div name="extension-top" id="extension-top"></div>');
var top = document.getElementById("extension-top");
document.getElementsByTagName('body')[0].style.marginTop = '40px';
top.src = chrome.extension.getURL("popup.html");
과 CSS :
#extension-top { width:100%; height:40px; top:0; left:0; background:#000;margin:0;padding:0;}
마지막으로 HTML :
이<body id="extension-content">
HELLO
</body>
막대가 표시하지만 "안녕하세요"아니다
은 내가 JS 파일이 어디에서 봐야 할 곳 =/
iframe이 분명히 방법입니다. 그렇지 않으면 영향을주지 않고 툴바를 삽입하는 페이지의 CSS에 영향을받지 않고 툴바를 스타일링하는 끔찍한 시간을 보게 될 것입니다. –