From a8b79f05e99867497de67cb03178702c76ff4bb5 Mon Sep 17 00:00:00 2001 From: Front <27463495+Frontesque@users.noreply.github.com> Date: Wed, 24 Nov 2021 15:57:08 -0500 Subject: [PATCH 1/6] optimizations --- Extensions/UserScript/Return Youtube Dislike.user.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Extensions/UserScript/Return Youtube Dislike.user.js b/Extensions/UserScript/Return Youtube Dislike.user.js index 1681d70..dc6de3e 100644 --- a/Extensions/UserScript/Return Youtube Dislike.user.js +++ b/Extensions/UserScript/Return Youtube Dislike.user.js @@ -21,12 +21,9 @@ function cLog(text, subtext = '') { } function doXHR(opts) { - if (typeof GM_xmlhttpRequest === 'function') { + if (typeof GM_xmlhttpRequest === 'function' || typeof GM.xmlHttpRequest === 'function') { return GM_xmlhttpRequest(opts); } - if (typeof GM.xmlHttpRequest === 'function') { - return GM.xmlHttpRequest(opts); - } console.warn('Unable to detect UserScript plugin, falling back to native XHR.'); @@ -73,11 +70,9 @@ function isVideoNotDisliked() { function getState() { if (isVideoLiked()) { return "liked"; - } - if (isVideoDisliked()) { + } else if (isVideoDisliked()) { return "disliked"; } - return "neutral"; } From 77b1336b230ad247f866467a61e1ca8b6985d46f Mon Sep 17 00:00:00 2001 From: Front <27463495+Frontesque@users.noreply.github.com> Date: Thu, 25 Nov 2021 21:18:04 -0500 Subject: [PATCH 2/6] :white_circle: Website 1.1.0 + Improved readability + Improved view on mobile devices and vertical monitors + Updated FAQ --- Website/layouts/default.vue | 11 ++++- Website/layouts/default_legacy.vue | 72 ++++++++++++++++++++++++++++++ Website/package-lock.json | 8 ++-- Website/package.json | 4 +- Website/pages/donate.vue | 33 +++++--------- Website/pages/faq.vue | 42 ++++++++--------- Website/pages/index.vue | 46 +++++++------------ Website/pages/install.vue | 61 +++++++++++-------------- Website/pages/links.vue | 45 +++++++------------ 9 files changed, 175 insertions(+), 147 deletions(-) create mode 100644 Website/layouts/default_legacy.vue diff --git a/Website/layouts/default.vue b/Website/layouts/default.vue index 504d83e..bfee7a4 100644 --- a/Website/layouts/default.vue +++ b/Website/layouts/default.vue @@ -13,7 +13,16 @@ - + +
+
+
+ + + +
+
+
diff --git a/Website/layouts/default_legacy.vue b/Website/layouts/default_legacy.vue new file mode 100644 index 0000000..8a67913 --- /dev/null +++ b/Website/layouts/default_legacy.vue @@ -0,0 +1,72 @@ + + + + + \ No newline at end of file diff --git a/Website/package-lock.json b/Website/package-lock.json index db6a2e4..0e61492 100644 --- a/Website/package-lock.json +++ b/Website/package-lock.json @@ -1,12 +1,12 @@ { - "name": "Return-Youtube-Dislike", - "version": "1.0.0", + "name": "return-youtube-dislike-site", + "version": "1.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "Return-Youtube-Dislike", - "version": "1.0.0", + "name": "return-youtube-dislike-site", + "version": "1.1.0", "dependencies": { "core-js": "^3.15.1", "nuxt": "^2.15.7", diff --git a/Website/package.json b/Website/package.json index 396e852..7ac5e93 100644 --- a/Website/package.json +++ b/Website/package.json @@ -1,6 +1,6 @@ { - "name": "Return-Youtube-Dislike", - "version": "1.0.0", + "name": "return-youtube-dislike-site", + "version": "1.1.0", "private": true, "scripts": { "dev": "nuxt", diff --git a/Website/pages/donate.vue b/Website/pages/donate.vue index 6b1b77f..7b5125e 100644 --- a/Website/pages/donate.vue +++ b/Website/pages/donate.vue @@ -1,29 +1,16 @@ diff --git a/Website/pages/faq.vue b/Website/pages/faq.vue index 5b882ea..375462a 100644 --- a/Website/pages/faq.vue +++ b/Website/pages/faq.vue @@ -1,27 +1,17 @@ @@ -31,16 +21,20 @@ data: () => ({ items: [ { - question: "Why is it not in chrome store yet?", - answer: "Chrome extension appoval process takes some time. As soon as it's available in the store - We'll update the site " + question: "Where does extension get data?", + answer: "Combination of GoogleAPI data and scraped data. We save all available data to our DB for it to be available after google shuts down dislike counts in their API." }, { - question: "Is it dangerous?/Is it a virus?", - answer: "While there is some trust involved in installing an extension from 3-rd party source - you can see all permissions requested by the extension before installing it. This extension only asks for access to youtube.com page " + question: "Video dislike count doesn't update", + answer: "Right now video dislikes are cached, and arent updated very frequenly. Once in 2-3 days, not more often Yeah, it's not ideal, but it is what it is. Working on improving how often we can update them" }, { - question: "I downvoted a video, and downvotes number didn't change", - answer: "Currently we're using YouTube API to get dislikes count. It may take some time for data to be updated. YouTube might freeze dislike counts as well. We're working on a solution for this " + question: "How does this work?", + answer: "The extension collects the video id of the video you are watching, fetches the dislike (and other fields like views, likes etc) using our API, if this is the first time the video was fetched by our API, it will use the YouTube API to get the data, then stores the data in a database for caching (cached for around 2-3 days) and archiving purposes and returns it to you. The extension then displays the dislikes to you." + }, + { + question: "What will happen after the YouTube API stops returning the dislike count?", + answer: "The backend will switch to using a combination of archived dislike stats, estimates extrapolated from extension user data and estimates based on view/like ratios for videos whose dislikes weren't archived and for outdated dislike archives." }, ], }), diff --git a/Website/pages/index.vue b/Website/pages/index.vue index c53a885..37e66c0 100644 --- a/Website/pages/index.vue +++ b/Website/pages/index.vue @@ -1,39 +1,27 @@ diff --git a/Website/pages/install.vue b/Website/pages/install.vue index 9d1779c..2cb9ffb 100644 --- a/Website/pages/install.vue +++ b/Website/pages/install.vue @@ -1,48 +1,37 @@ diff --git a/Website/pages/links.vue b/Website/pages/links.vue index 133de7a..d869610 100644 --- a/Website/pages/links.vue +++ b/Website/pages/links.vue @@ -1,40 +1,29 @@