diff --git a/Extensions/chrome/manifest.json b/Extensions/chrome/manifest.json
index 4093c97..fa13c00 100644
--- a/Extensions/chrome/manifest.json
+++ b/Extensions/chrome/manifest.json
@@ -1,7 +1,7 @@
{
"name": "Return YouTube Dislike",
"description": "Returns ability to see dislikes",
- "version": "1.1.0.0",
+ "version": "1.1.0.2",
"manifest_version": 3,
"background": {
"service_worker": "return-youtube-dislike.background.js"
diff --git a/Extensions/chrome/popup.html b/Extensions/chrome/popup.html
index 380697a..11671f4 100644
--- a/Extensions/chrome/popup.html
+++ b/Extensions/chrome/popup.html
@@ -25,7 +25,7 @@
-
+
diff --git a/Extensions/chrome/return-youtube-dislike.script.js b/Extensions/chrome/return-youtube-dislike.script.js
index 1a2cc2e..a60e77b 100644
--- a/Extensions/chrome/return-youtube-dislike.script.js
+++ b/Extensions/chrome/return-youtube-dislike.script.js
@@ -143,7 +143,7 @@
function setInitalState() {
setState();
- // setTimeout(() => sendVideoIds(), 1500);
+ setTimeout(() => sendVideoIds(), 1500);
}
function getVideoId(url) {
@@ -171,12 +171,10 @@
const userLocales = navigator.language;
const formatter = Intl.NumberFormat(userLocales, {
- notation: 'compact',
- minimumFractionDigits: 1,
- maximumFractionDigits: 1
+ notation: 'compact'
});
- return formatter.format(roundDown(numberState)).replace(/\.0|,0/, '');
+ return formatter.format(roundDown(numberState));
}
var jsInitChecktimer = null;
@@ -249,24 +247,24 @@
}
}
- // function sendVideoIds() {
- // const ids = Array.from(
- // document.getElementsByClassName(
- // "yt-simple-endpoint ytd-compact-video-renderer"
- // )
- // )
- // .concat(
- // Array.from(
- // document.getElementsByClassName("yt-simple-endpoint ytd-thumbnail")
- // )
- // )
- // .filter((x) => x.href && x.href.indexOf("/watch?v=") > 0)
- // .map((x) => getVideoId(x.href));
- // chrome.runtime.sendMessage(extensionId, {
- // message: "send_links",
- // videoIds: ids,
- // });
- // }
+ function sendVideoIds() {
+ const ids = Array.from(
+ document.getElementsByClassName(
+ "yt-simple-endpoint ytd-compact-video-renderer"
+ )
+ )
+ .concat(
+ Array.from(
+ document.getElementsByClassName("yt-simple-endpoint ytd-thumbnail")
+ )
+ )
+ .filter((x) => x.href && x.href.indexOf("/watch?v=") > 0)
+ .map((x) => getVideoId(x.href));
+ chrome.runtime.sendMessage(extensionId, {
+ message: "send_links",
+ videoIds: ids,
+ });
+ }
setEventListeners();
@@ -276,9 +274,7 @@
setEventListeners();
});
- // window.onscrollend = () => {
- // sendVideoIds();
- // };
- // setTimeout(() => sendVideoIds(), 1500);
+
+ setTimeout(() => sendVideoIds(), 2500);
})(document.currentScript.getAttribute("extension-id"));
diff --git a/Extensions/firefox/manifest.json b/Extensions/firefox/manifest.json
index 32d25c9..8d3f59e 100644
--- a/Extensions/firefox/manifest.json
+++ b/Extensions/firefox/manifest.json
@@ -1,7 +1,7 @@
{
"name": "Return YouTube Dislike",
"description": "Returns ability to see dislikes",
- "version": "1.1.0.0",
+ "version": "1.1.0.2",
"manifest_version": 2,
"background": {
"scripts": ["return-youtube-dislike.background.js"]
diff --git a/Extensions/firefox/return-youtube-dislike.script.js b/Extensions/firefox/return-youtube-dislike.script.js
index b02b8ee..ac676e4 100644
--- a/Extensions/firefox/return-youtube-dislike.script.js
+++ b/Extensions/firefox/return-youtube-dislike.script.js
@@ -160,12 +160,10 @@ function numberFormat(numberState) {
const userLocales = navigator.language;
const formatter = Intl.NumberFormat(userLocales, {
- notation: "compact",
- minimumFractionDigits: 1,
- maximumFractionDigits: 1,
+ notation: "compact"
});
- return formatter.format(roundDown(numberState)).replace(/\.0|,0/, "");
+ return formatter.format(roundDown(numberState));
}
function setEventListeners(evt) {