From 41312c105cf673664f77ef7c003bf28475b618d4 Mon Sep 17 00:00:00 2001
From: Pierre Ranwez <pierre.ranwez.etu@univ-lille.fr>
Date: Tue, 8 Feb 2022 13:45:35 +0100
Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20CSSLSD=20in=20dev=20tools?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 devtools.html |  5 +++++
 devtools.js   | 21 +++++++++++++++++++++
 manifest.json |  1 +
 3 files changed, 27 insertions(+)
 create mode 100644 devtools.html
 create mode 100644 devtools.js

diff --git a/devtools.html b/devtools.html
new file mode 100644
index 0000000..eedeac3
--- /dev/null
+++ b/devtools.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<html lang="en">
+<script src="devtools.js"></script>
+
+</html>
\ No newline at end of file
diff --git a/devtools.js b/devtools.js
new file mode 100644
index 0000000..95533e8
--- /dev/null
+++ b/devtools.js
@@ -0,0 +1,21 @@
+(function () {
+
+    var backgroundPageConnection = chrome.runtime.connect({
+        name: "devtools-page"
+    });
+
+    backgroundPageConnection.onMessage.addListener(function (message) {
+        // Handle responses from the background page, if any
+    });
+
+    var panels = chrome.devtools.panels;
+
+    // panel
+    var panel = panels.create(
+        "CSSLSD",
+        "ressources/icon256.png",
+        "popup.html", function () {
+            // Relay the tab ID to the background page
+        }
+    );
+})();
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
index 49c9003..b16807a 100644
--- a/manifest.json
+++ b/manifest.json
@@ -12,6 +12,7 @@
     "background": {
         "service_worker": "background.js"
     },
+    "devtools_page": "devtools.html",
     "permissions": [
         "storage",
         "activeTab",
-- 
GitLab