Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Anarios/return-youtube-dislike.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKendall <kendalldoescoding@gmail.com>2022-07-24 15:20:37 +0300
committerGitHub <noreply@github.com>2022-07-24 15:20:37 +0300
commitc4f3b37a38db8d1608c4069b2eeb9b7672ead5b3 (patch)
tree7f163862cc6396283c5e92c46290eca6fbba1358
parent16b1c2ccf0ac7d419ae1df40bdd313234557807f (diff)
parentfd49f02b383b0088fe9f2cbcae0970626cf44259 (diff)
Merge pull request #16 from Anarios/main
[pull] main from Anarios:main
-rw-r--r--.github/FUNDING.yml2
-rw-r--r--.github/ISSUE_TEMPLATE/bug.yml11
-rw-r--r--.github/ISSUE_TEMPLATE/feature-request.yml10
-rw-r--r--.github/workflows/commentCommands.yml54
-rw-r--r--Docs/Guide__Troubleshooting.md4
-rw-r--r--Extensions/combined/_locales/en/messages.json2
-rw-r--r--Extensions/combined/src/starRating.js101
-rw-r--r--Extensions/combined/src/state.js2
-rw-r--r--Website/_locales/tr.ts2
9 files changed, 182 insertions, 6 deletions
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 0000000..16aabc9
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,2 @@
+patreon: returnyoutubedislike
+custom: "https://returnyoutubedislike.com/donate"
diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml
index 2bf949b..177632e 100644
--- a/.github/ISSUE_TEMPLATE/bug.yml
+++ b/.github/ISSUE_TEMPLATE/bug.yml
@@ -1,6 +1,6 @@
name: Bug Report
description: File a bug report!
-title: "(Bug): "
+# title: "(Bug): "
labels: ["bug"]
body:
- type: input
@@ -55,4 +55,13 @@ body:
value: "Tell us how it happened with detailed steps for us."
validations:
required: true
+- type: dropdown
+ attributes:
+ label: "Will you be available for follow-up questions to help developers diagnose & fix the issue?"
+ options:
+ - "Yes"
+ - "No"
+ validations:
+ required: true
+
diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml
index b9a15d6..123d9d0 100644
--- a/.github/ISSUE_TEMPLATE/feature-request.yml
+++ b/.github/ISSUE_TEMPLATE/feature-request.yml
@@ -1,6 +1,6 @@
name: Feature Request
description: Request or suggest a new feature!
-title: "(Feature Request): "
+# title: "(Feature Request): "
labels: ["enhancement"]
body:
- type: dropdown
@@ -28,4 +28,12 @@ body:
options:
- label: "Yes"
- label: "No"
+- type: dropdown
+ attributes:
+ label: "Will you be available for follow-up questions to help developers implement this?"
+ options:
+ - "Yes"
+ - "No"
+ validations:
+ required: true
diff --git a/.github/workflows/commentCommands.yml b/.github/workflows/commentCommands.yml
new file mode 100644
index 0000000..fbf4aad
--- /dev/null
+++ b/.github/workflows/commentCommands.yml
@@ -0,0 +1,54 @@
+name: commentCommands
+
+on:
+ issue_comment:
+ types: created
+
+jobs:
+
+ assign-commenter:
+ runs-on: ubuntu-latest
+ if: |
+ contains(github.event.comment.body, '/assignme') ||
+ contains(github.event.comment.body, '/assign me')
+ steps:
+ - name: Assigning to commenter
+ run: |
+ curl \
+ -X POST \
+ -H "Accept: application/vnd.github+json" \
+ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
+ https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees \
+ -d '{"assignees":["${{ github.event.comment.user.login }}"]}'
+ request-issue-framing-improvement:
+ runs-on: ubuntu-latest
+ if: |
+ contains(github.event.comment.body,'/improve') && (
+ github.event.comment.author_association == 'OWNER' ||
+ github.event.comment.author_association == 'COLLABORATOR' ||
+ github.event.comment.author_association == 'CONTRIBUTOR' )
+ steps:
+ - name: request-issue-framing-improvement
+ run: |
+ curl \
+ -X POST \
+ -H "Accept: application/vnd.github+json" \
+ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
+ https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments \
+ -d '{"body":"This issue is put on hold due to low quality. No reviews or fixes will be performed at this time. Eventually, it will be closed. While we appreciate your effort writing, we are not able to further investigate it. Please improve it by writing a better title or providing more details, and you may re-open it."}'
+ add-label-duplicate:
+ runs-on: ubuntu-latest
+ if: |
+ contains(github.event.comment.body, '/duplicate') && (
+ github.event.comment.author_association == 'OWNER' ||
+ github.event.comment.author_association == 'COLLABORATOR' ||
+ github.event.comment.author_association != 'CONTRIBUTOR' )
+ steps:
+ - name: add-label-duplicate
+ run: |
+ curl \
+ -X POST \
+ -H "Accept: application/vnd.github+json" \
+ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
+ https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels \
+ -d '{"labels":["duplicate"]}'
diff --git a/Docs/Guide__Troubleshooting.md b/Docs/Guide__Troubleshooting.md
index 62f2d39..9409d49 100644
--- a/Docs/Guide__Troubleshooting.md
+++ b/Docs/Guide__Troubleshooting.md
@@ -27,8 +27,8 @@ Troubleshooting Guide
1. Make sure you have the latest version of the extension installed. ([Click Here to check](https://chrome.google.com/webstore/detail/return-youtube-dislike/gebbhagfogifgggkldgodflihgfeippi#:~:text=Report%20abuse-,Version,-2.0.0.3))
2. Close all the tabs & restart your browser
3. Reinstall the extension.
-4. [Check API status]
-5. [Check service worker] (only for chromium based browsers)
+4. [Check API status](#check-api-status)
+5. [Check Cloudflare status](https://www.cloudflarestatus.com/)
6. [If you are on Windows 7 read this](#install-certificates)
<br>
diff --git a/Extensions/combined/_locales/en/messages.json b/Extensions/combined/_locales/en/messages.json
index 28c476c..99deba7 100644
--- a/Extensions/combined/_locales/en/messages.json
+++ b/Extensions/combined/_locales/en/messages.json
@@ -36,7 +36,7 @@
"message": "Stops counting your likes and dislikes."
},
"textTempUnavailable": {
- "message": "temporarily unavailable"
+ "message": "temp n/a"
},
"textUpdate": {
"message": "update to"
diff --git a/Extensions/combined/src/starRating.js b/Extensions/combined/src/starRating.js
new file mode 100644
index 0000000..5d98814
--- /dev/null
+++ b/Extensions/combined/src/starRating.js
@@ -0,0 +1,101 @@
+import { cLog } from "./utils";
+
+function createStarRating(rating, isMobile) {
+ let starRating = document.createElement('label');
+
+ let starSlider = document.createElement("input");
+ starSlider.setAttribute("class", "rating");
+ starSlider.setAttribute("max", "5");
+ starSlider.setAttribute("readonly", "");
+ starSlider.setAttribute("style", `--fill:rgb(255, 215, 0);--value:${rating.toString()};};background-color: transparent;`);
+ starSlider.setAttribute("type", "range");
+
+ starRating.appendChild(starSlider);
+
+ let YTLikeButton;
+
+ if (isMobile){
+ YTLikeButton = document.querySelector('#app > div.page-container > ytm-watch > ytm-single-column-watch-next-results-renderer > ytm-slim-video-metadata-section-renderer > ytm-slim-video-action-bar-renderer > div > ytm-slim-metadata-toggle-button-renderer:nth-child(1)');
+ } else {
+ YTLikeButton = document.querySelector('#top-level-buttons-computed > ytd-toggle-button-renderer:nth-child(1)');
+ }
+
+ YTLikeButton.insertAdjacentElement('afterend', starRating);
+
+ try {
+ let YTBar = document.querySelector('#ryd-bar-container');
+ YTBar.setAttribute("style", "width: 190%; height: 2px;");
+ }
+ catch(err) {
+ cLog("RateBar Not Present");
+ }
+
+
+
+ let style = `<style>
+
+.rating {
+ --dir: right;
+ --fill: gold;
+ --fillbg: rgba(100, 100, 100, 0.15);
+ --star: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 17.25l-6.188 3.75 1.641-7.031-5.438-4.734 7.172-0.609 2.813-6.609 2.813 6.609 7.172 0.609-5.438 4.734 1.641 7.031z"/></svg>');
+ --stars: 5;
+ --starSize: 2.8rem;
+ --symbol: var(--star);
+ --value: 1;
+ --w: calc(var(--stars) * var(--starSize));
+ --x: calc(100% * (var(--value) / var(--stars)));
+ block-size: var(--starSize);
+ inline-size: var(--w);
+ position: relative;
+ touch-action: manipulation;
+ -webkit-appearance: none;
+}
+
+[dir="rtl"] .rating {
+ --dir: left;
+}
+
+.rating::-moz-range-track {
+ background: linear-gradient(to var(--dir), var(--fill) 0 var(--x), var(--fillbg) 0 var(--x));
+ block-size: 100%;
+ mask: repeat left center/var(--starSize) var(--symbol);
+}
+
+.rating::-webkit-slider-runnable-track {
+ background: linear-gradient(to var(--dir), var(--fill) 0 var(--x), var(--fillbg) 0 var(--x));
+ block-size: 100%;
+ mask: repeat left center/var(--starSize) var(--symbol);
+ -webkit-mask: repeat left center/var(--starSize) var(--symbol);
+}
+
+.rating::-moz-range-thumb {
+ height: var(--starSize);
+ opacity: 0;
+ width: var(--starSize);
+}
+
+.rating::-webkit-slider-thumb {
+ height: var(--starSize);
+ opacity: 0;
+ width: var(--starSize);
+ -webkit-appearance: none;
+}
+
+.rating,
+.rating-label {
+ display: block;
+ font-family: ui-sans-serif, system-ui, sans-serif;
+}
+
+.rating-label {
+ margin-block-end: 1rem;
+}
+
+</style>`;
+
+document.head.insertAdjacentHTML("beforeend", style);
+
+ }
+
+ export { createStarRating };
diff --git a/Extensions/combined/src/state.js b/Extensions/combined/src/state.js
index df9d561..7160903 100644
--- a/Extensions/combined/src/state.js
+++ b/Extensions/combined/src/state.js
@@ -8,6 +8,7 @@ import {
getColorFromTheme,
} from "./utils";
import { localize } from "./utils";
+import { createStarRating } from "./starRating";
//TODO: Do not duplicate here and in ryd.background.js
const apiUrl = "https://returnyoutubedislikeapi.com";
@@ -199,6 +200,7 @@ function processResponse(response, storedData) {
getDislikeButton().style.color = getColorFromTheme(false);
}
}
+ createStarRating(response.rating, isMobile());
}
// Tells the user if the API is down
diff --git a/Website/_locales/tr.ts b/Website/_locales/tr.ts
index c5986c1..f064e10 100644
--- a/Website/_locales/tr.ts
+++ b/Website/_locales/tr.ts
@@ -81,7 +81,7 @@ export default {
bullet4: 'Dislike sayımı sizinle paylaşabilir miyim?',
bullet4text: 'Çok yakında evet. İçerik üreticilerinin dislike sayıları için doğrulanabilirliğini paylaşabilmeleri amacıyla Oauth ya da sınırlı bir kapsamda farklı bir salt okunur API kullanmayı düşünüyoruz.',
bullet5: 'Hangi verileri topluyorsunuz ve bunlar nasıl işleniyor?',
- bullet5text: 'Uzantı, yalnızca izlediğiniz videonun IP adresi veya videonun ID\'si gibi düzgün çalışması için kesinlikle gerekli olan verileri toplar. Verileriniz asla 3. taraflara satılmayacaktır. Güvenliği ve gizliliği nasıl ele aldığımız hakkında daha fazla bilgi için <a href="https://github.com/Anarios/return-youtube-dislike/blob/main/Docs/SECURITY-FAQ.md">security FAQ</a>'ya gidin.',
+ bullet5text: 'Uzantı, yalnızca izlediğiniz videonun IP adresi veya videonun ID\'si gibi düzgün çalışması için kesinlikle gerekli olan verileri toplar. Verileriniz asla 3. taraflara satılmayacaktır. Güvenliği ve gizliliği nasıl ele aldığımız hakkında daha fazla bilgi için <a href="https://github.com/Anarios/return-youtube-dislike/blob/main/Docs/SECURITY-FAQ.md">security FAQ</a>\'ya gidin.',
bullet6: 'API/Yazılım(Backend) nasıl çalışıyor?',
bullet6text: 'Yazılım, YouTube API\'sinin dislike sayısını ve uzantı kullanıcılarının like/dislike sayısı sonuçların genişletilmesinin döndürmeye devam ettiği zamana ait arşivlenmiş verileri kullanır. Yakın zamanda içerik üreticilerin dislike sayısını kolay ve güvenli bir şekilde göndermelerine izin vereceğiz ve ArchiveTeam\'in arşivlenmiş verilerini (4,56 milyar video) veri tabanımıza ekleyeceğiz. Ayrıca konu ile ilgili videoyu da izleyebilirsiniz.',
bullet7: 'Dislike sayısı neden \'DISLIKES DISABLED\'(DISLIKE\'LAR AKTİF DEĞİL) olarak gözüküyor?',