November 26, 2021
2021 NAVER DEVIEW <슬기로운 웨일앱 개발> 세션 들으며 정리한 내용
"manifest_version": 2,
"name": "__MSG_APP_NAME__",
"description": "__MSG_APP_DESCRIPTION__",
"default_locale": "ko",
"version": "1.0.1",
"icon": {
"16": "icons/icon16.png",
"48": "icons/icon48.png",
"128": "icons/icon128.png"
},
"content_scripts": [
{
"matches": [
"http://*/*",
"https://*/*"
],
"js": [ "js/content-script.js" ],
"css": [ "css/content-style.css" ],
"run_at": "document_start"
}
],
"background": {
"scripts": [
"js/background.js"
]
},
"permissions": [
"<all_urls>"
],
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'"manifest_version: 2 고정name: 확장앱 이름description: 확장앱 설명version: 확장앱 버전icon: 확장앱 관리자 페이지에 표시되는 아이콘 (사이즈별)content_scripts
속성 종류
matches: content script가 실행되는 페이지를 지정js: 불러올 js 파일css: 불러올 css 파일run_at: content script가 실행되는 시점. document가 렌더링되기 전이나 후로 지정할 수 있다.matches 설정
"matches": [
"http://www.instagram.com/*",
"https://www.instagram.com/*"
],인스타그램의 댓글 부분 안보이게 처리하기
.HP0qD {
display: none !important;
}.HP0qDdisplay: none 속성 추가!important 추가테스트
page_action, browser_action, sidebar_action 속성을 이용해서 원하는 위치에 HTML 페이지를 띄울 수 있다.
page_action
browser_action
sidebar_action
"sidebar_action": {
"default_page": "index.html",
"default_icon": {
"48": "icons/icon48.png",
"192": "icons/icon192.png"
},
"default_title": "__MSG_APP_NAME__",
"use_navigation_bar": true
}.sendMessage().onMessage()압축 파일 선택하여 업로드
확장앱 정보 입력
리뷰 요청