File tree Expand file tree Collapse file tree 1 file changed +3
-23
lines changed
how-to-make-chrome-extensions/bear Expand file tree Collapse file tree 1 file changed +3
-23
lines changed Original file line number Diff line number Diff line change 1
- document . addEventListener ( 'DOMContentLoaded' , function ( ) {
2
-
3
- const bg = chrome . extension . getBackgroundPage ( )
4
- Object . keys ( bg . bears ) . forEach ( function ( url ) {
5
- const div = document . createElement ( 'div' )
6
- div . textContent = `${ url } : ${ bg . bears [ url ] } `
7
- document . body . appendChild ( div )
8
- } )
9
-
10
- // document.querySelector('button').addEventListener('click', onclick, false)
11
- //
12
- // function onclick () {
13
- // chrome.tabs.query({currentWindow: true, active: true}, function (tabs) {
14
- // chrome.tabs.sendMessage(tabs[0].id, 'hi', setCount)
15
- // })
16
- // }
17
- //
18
- // function setCount (res) {
19
- // const div = document.createElement('div')
20
- // div.textContent = `${res.count} bears`
21
- // document.body.appendChild(div)
22
- // }
23
- } , false )
1
+ function myFunction ( ) {
2
+ window . open ( "https://neverinstall.com/" ) ;
3
+ }
You can’t perform that action at this time.
0 commit comments