๐Ÿ“”
Today Joonas Learned
  • Home
  • About Me
  • Chrome Extension
    • CSS injection
  • Design Pattern
    • SOLID ์›์น™
      • 1. SRP
      • 2. OCP
      • 3. LSP
      • 4. ISP
      • 5. DIP
    • ์ƒ์„ฑ ํŒจํ„ด
      • Singleton Pattern
      • Abstract Factory Pattern
      • Factory Method Pattern
    • ๊ตฌ์กฐ ํŒจํ„ด
      • Adapter Pattern
      • Bridge Pattern
      • Composite Pattern
      • Decorator Pattern
      • Facade Pattern
      • Proxy Pattern
    • ํ–‰์œ„ ํŒจํ„ด
      • Command Pattern
      • Observer Pattern
      • State Pattern
      • Strategy Pattern
      • Template Method Pattern
  • Graphics
    • OpenGL ES
      • ํŒŒ์ดํ”„๋ผ์ธ
      • ์‚ผ๊ฐํ˜• ๊ทธ๋ฆฌ๊ธฐ
      • ์‚ผ๊ฐํ˜• ์›€์ง์ด๊ธฐ
      • ๋‹ค๊ฐํ˜• ๊ทธ๋ฆฌ๊ธฐ
      • ์ •์‚ฌ๋ฉด์ฒด ๊ทธ๋ฆฌ๊ธฐ
      • [WIP] ๋งˆ์ธํฌ๋ž˜ํ”„ํŠธ ๋ธ”๋Ÿญ ๋งŒ๋“ค๊ธฐ
      • [WIP] Lighting, Normal Mapping
  • Internet
    • iOS/Safari
  • Javascript
    • async, defer ์†์„ฑ
    • ๋‚˜๋จธ์ง€ ๋งค๊ฐœ๋ณ€์ˆ˜ (Rest parameter)
    • ํ™”์‚ดํ‘œ ํ•จ์ˆ˜ ํ‘œํ˜„ (arrow function expression)
    • Template Literals
    • TDZ (Temporal Dead Zone)
    • Spread syntax (...)
  • Network
    • OSI 7 ๊ณ„์ธต ๋ชจ๋ธ
  • Uncategorized
    • 2021/12/07
    • 2020/09/03
    • 2020/09/04
    • 2020/08/22
  • git/VCS
    • Merge ์ปค๋ฐ‹ ๋ฉ”์‹œ์ง€ ์ˆ˜์ •
Powered by GitBook
On this page

Was this helpful?

  1. Chrome Extension

CSS injection

PreviousChrome ExtensionNextDesign Pattern

Last updated 4 years ago

Was this helpful?

ํŒ์—…์ฐฝ์ด๋‚˜ background์—์„œ ๋™์ž‘ํ•œ๋‹ค๋ฉด, chrome.tabs.insertCSS ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

content_script ๋“ฑ์„ ์ง€์ •ํ•ด์„œ ํŠน์ • ์กฐ๊ฑด์—์„œ๋งŒ ๋™์ž‘ํ•˜๊ฒŒ ํ–ˆ๋‹ค๋ฉด, ์œ„ ๋ฉ”์†Œ๋“œ๋Š” ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๋‹ค.

๋Œ€์‹ , ๋™์ ์œผ๋กœ ํŒŒ์ผ์„ ์ฝ์–ด์„œ head์— ์ถ”๊ฐ€ํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ๋Š”๋ฐ, ๊ทธ๋Ÿฌ๊ธฐ ์œ„ํ•ด์„œ๋Š” ๋จผ์ € ๊ทธ ํŒŒ์ผ์„ ์— ์ถ”๊ฐ€ํ•˜์—ฌ ๊ถŒํ•œ์„ ๋จผ์ € ๋“ฑ๋กํ•ด์ฃผ์–ด์•ผํ•œ๋‹ค.

Links

"web_accessible_resources"
https://stackoverflow.com/questions/33716881/chrome-extension-how-to-insert-css-conditioned-on-variable-from-chrome-storage/33719884