Skip to content

Commit

Permalink
Before npm init
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonGenin committed Nov 6, 2020
1 parent b3bd8f1 commit c97ac32
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 32 deletions.
File renamed without changes
1 change: 0 additions & 1 deletion background.html

This file was deleted.

9 changes: 5 additions & 4 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"manifest_version": 2,
"description": "Chrome Extension starter Kit with es6 standards",
"browser_action": {
"default_icon": "images/icon.png",
"default_popup": "popup.html"
"default_icon": "assets/images/icon.png",
"default_popup": "src/popup/popup.html"
},
"permissions": [
"cookies",
Expand All @@ -19,7 +19,8 @@
],
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
"background": {
"page": "background.html",
"page": "src/background.html",
"persistent": false
}
},
"devtools_page": "src/devtools/devtools.html"
}
26 changes: 0 additions & 26 deletions scripts/extension/background.js

This file was deleted.

1 change: 1 addition & 0 deletions src/background.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<script type="module" src="./background.js"></script>
9 changes: 9 additions & 0 deletions src/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { contentUtils } from './utils/contentUtils.js';
import { tabUtils } from './utils/tabUtils.js';

const init = () => {
console.log('Init background.js');
// do something ?
};

window.onload = init;
12 changes: 12 additions & 0 deletions src/devtools/devtools.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="devtools.js"></script>
</head>
<body>
Coucou
</body>
</html>
7 changes: 7 additions & 0 deletions src/devtools/devtools.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
chrome.devtools.panels.create("Owl",
"MyPanelIcon.png",
"Panel.html",
function(panel) {
// code invoked on panel creation
}
);
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const contentUtils = {
});

chrome.tabs.executeScript(tabId, {
file: 'scripts/utils/getPagesSource.js'
file: './getPagesSource.js'
}, () => {
// console.log('Inside executeScript ');
// If you try and inject into an extensions page or the webstore/NTP you'll get an error
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit c97ac32

Please sign in to comment.