diff --git a/js/popup.js b/js/popup.js new file mode 100644 index 0000000..c6c8666 --- /dev/null +++ b/js/popup.js @@ -0,0 +1,14 @@ +// Fetch the version number from the GitHub API +fetch("https://api.github.com/repos/nomandhoni-cs/Facebook-QuietFeed/tags") + .then((response) => response.json()) + .then((tags) => { + if (tags && tags.length > 0) { + const versionNumber = tags[0].name; + document.getElementById( + "version" + ).textContent = `Version: ${versionNumber}`; + } + }) + .catch((error) => { + console.error("Error fetching version:", error); + }); diff --git a/popup.html b/popup.html index 6e8e994..0d971cd 100644 --- a/popup.html +++ b/popup.html @@ -11,18 +11,22 @@