-
Q1 - How to load extension to chrome?
Open Setting->Extenstion->Load unpack extenstion
Then, Load dist
directory
or Check this video
-
Q2 - How to management dom?
const main = document.querySelector('#main')
const p = document.createElement('p')
p.innerText = 'this is p'
main.appendChild(p)
-
Q3 - How to use axios in chrome-extenstion
document.addEventListener('click', (e: any) => {
axios.get('https://www.google.com')
.then(res => {
console.log(res)
})
})
-
Q4 - How to inject css to with content scripts ? - See it in manifest.json
-
Q5 - How to use third-party .css
or .js
files in popup.html
{
"content_security_policy": "script-src 'self' https://code.getmdl.io/1.3.0/material.min.js 'self'; object-src 'self'",
}
-
Q6 - How to publish - see this video
-
Q7 - How to switch to different ctx mode ?
check #custom section