aboutsummaryrefslogtreecommitdiff
path: root/public/content_script.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/content_script.js')
-rw-r--r--public/content_script.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/public/content_script.js b/public/content_script.js
new file mode 100644
index 0000000..612ecf5
--- /dev/null
+++ b/public/content_script.js
@@ -0,0 +1,27 @@
+(function(){
+
+ /* Open port on popup file */
+ const port = chrome.runtime.connect({
+ name: "bookmarkArranger"
+ });
+
+ /* Listen for messages on the port */
+ port.onMessage.addListener(message => {
+ console.log(message)
+ });
+
+ document.getElementById('sendMessage').addEventListener('click', ()=>{
+ /* Send a message through the port */
+ port.postMessage({
+ code: "getBookMarks"
+ });
+ })
+
+
+
+
+})();
+
+
+
+