diff --git a/deezer-tooter/browserAction/index.html b/deezer-tooter/browserAction/index.html new file mode 100644 index 0000000..125d948 --- /dev/null +++ b/deezer-tooter/browserAction/index.html @@ -0,0 +1,14 @@ + + + + + + + + +
+
+ Gemini + + + diff --git a/deezer-tooter/browserAction/script.js b/deezer-tooter/browserAction/script.js new file mode 100644 index 0000000..770fa5b --- /dev/null +++ b/deezer-tooter/browserAction/script.js @@ -0,0 +1,20 @@ + +function tootButtonHandler() { + // TODO : add content script to get the pages' HTML elements + tootContent = "Now playing awesome stuff !" + url = "http://localhost:5000/toot?content=" + console.log(tootContent) + fetch(url) + .then(function (response) { + return response; + }) + .then(function (response) { + console.log("Got response : " + response); + }) + .catch(function (error) { + console.log("Error while tooting: " + error); + }) +} + +button = document.getElementById('toot-button') +button.onclick = tootButtonHandler \ No newline at end of file diff --git a/deezer-tooter/browserAction/style.css b/deezer-tooter/browserAction/style.css new file mode 100644 index 0000000..e69de29 diff --git a/deezer-tooter/content_script.js b/deezer-tooter/content_script.js new file mode 100644 index 0000000..e69de29 diff --git a/deezer-tooter/icons/icon.png b/deezer-tooter/icons/icon.png new file mode 100644 index 0000000..063cfa8 Binary files /dev/null and b/deezer-tooter/icons/icon.png differ diff --git a/deezer-tooter/manifest.json b/deezer-tooter/manifest.json new file mode 100644 index 0000000..8733124 --- /dev/null +++ b/deezer-tooter/manifest.json @@ -0,0 +1,29 @@ +{ + "manifest_version": 2, + "name": "Deezer Tooter", + "description": "Toots currently playing track from Deezer", + "version": "0.1", + "icons": { + "64": "icons/icon.png" + }, + "content_scripts": [ + { + "matches": [ + "*://*.mozilla.org/*" + ], + "js": [ + "content_script.js" + ] + } + ], + "browser_action": { + "default_icon": { + "64": "icons/icon.png" + }, + "default_popup": "browserAction/index.html", + "default_title": "Deezer Tooter" + }, + "options_ui": { + "page": "options/index.html" + } +} \ No newline at end of file diff --git a/deezer-tooter/options/index.html b/deezer-tooter/options/index.html new file mode 100644 index 0000000..9cd1953 --- /dev/null +++ b/deezer-tooter/options/index.html @@ -0,0 +1,11 @@ + + + + + + + +

My content

+ + + diff --git a/deezer-tooter/options/script.js b/deezer-tooter/options/script.js new file mode 100644 index 0000000..58ffbf9 --- /dev/null +++ b/deezer-tooter/options/script.js @@ -0,0 +1 @@ +document.getElementById('myHeading').style.color = 'red' diff --git a/deezer-tooter/options/style.css b/deezer-tooter/options/style.css new file mode 100644 index 0000000..001d5c5 --- /dev/null +++ b/deezer-tooter/options/style.css @@ -0,0 +1,3 @@ +h1 { + font-style: italic; +}