Merge pull request #16 from Anarios/main

[pull] main from Anarios:main
This commit is contained in:
Kendall authored and GitHub committed 2022-07-24 17:50:37 +05:30
commit c4f3b37a38
9 files changed
+182 -6

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
patreon: returnyoutubedislike
custom: "https://returnyoutubedislike.com/donate"
+10 -1
View File
@@ -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
+9 -1
View File
@@ -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
+54
View File
@@ -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"]}'
+2 -2
View File
@@ -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>
@@ -36,7 +36,7 @@
"message": "Stops counting your likes and dislikes."
},
"textTempUnavailable": {
"message": "temporarily unavailable"
"message": "temp n/a"
},
"textUpdate": {
"message": "update to"
+101
View File
@@ -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 };
+2
View File
@@ -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
+1 -1
View File
@@ -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?',