mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-10-28 07:40:27 +01:00
Fixes after merges, prettier globally applied
This commit is contained in:
+26
-14
@@ -54,10 +54,10 @@
|
||||
</v-btn>
|
||||
</div>
|
||||
|
||||
<!-- <div class="mb-4" style="color: #999">-->
|
||||
<!-- Get dislikes manually: <input placeholder=" Video URL">-->
|
||||
<!-- <p id="output"></p>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="mb-4" style="color: #999">-->
|
||||
<!-- Get dislikes manually: <input placeholder=" Video URL">-->
|
||||
<!-- <p id="output"></p>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<v-spacer />
|
||||
<div id="support-ukraine" class="d-flex flex-column items-center py-2">
|
||||
@@ -77,7 +77,9 @@
|
||||
<v-row class="justify-center mx-auto">
|
||||
<p v-for="sponsor in sponsors" :key="sponsor.name" class="sponsor">
|
||||
<a
|
||||
:style="sponsor.link ? { cursor: 'pointer' } : { cursor: 'default' }"
|
||||
:style="
|
||||
sponsor.link ? { cursor: 'pointer' } : { cursor: 'default' }
|
||||
"
|
||||
:href="sponsor.link"
|
||||
rel="sponsored"
|
||||
>
|
||||
@@ -113,23 +115,33 @@ export default {
|
||||
},
|
||||
{
|
||||
name: "PocketTube",
|
||||
link: "https://yousub.info/?utm_source=returnyoutubedislike"
|
||||
}, {
|
||||
link: "https://yousub.info/?utm_source=returnyoutubedislike",
|
||||
},
|
||||
{
|
||||
name: "Become our sponsor",
|
||||
link: "https://www.patreon.com/join/returnyoutubedislike/checkout?rid=8008601"
|
||||
}
|
||||
link: "https://www.patreon.com/join/returnyoutubedislike/checkout?rid=8008601",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
const YOUTUBE_REGEX = /(?:http:|https:)*?\/\/(?:www\.|)(?:youtube\.com|m\.youtube\.com|youtu\.|youtube-nocookie\.com).*(?:v=|v%3D|v\/|(?:a|p)\/(?:a|u)\/\d.*\/|watch\?|vi(?:=|\/)|\/embed\/|oembed\?|be\/|e\/)([^&?%#/\n]*)/;
|
||||
const YOUTUBE_REGEX =
|
||||
/(?:http:|https:)*?\/\/(?:www\.|)(?:youtube\.com|m\.youtube\.com|youtu\.|youtube-nocookie\.com).*(?:v=|v%3D|v\/|(?:a|p)\/(?:a|u)\/\d.*\/|watch\?|vi(?:=|\/)|\/embed\/|oembed\?|be\/|e\/)([^&?%#/\n]*)/;
|
||||
let lastVideoId = "";
|
||||
window.oninput = (e) => {
|
||||
const videoId = (e.target.value.match(YOUTUBE_REGEX) || {})[1] || e.target.value;
|
||||
const videoId =
|
||||
(e.target.value.match(YOUTUBE_REGEX) || {})[1] || e.target.value;
|
||||
if (videoId !== lastVideoId && videoId.length === 11) {
|
||||
fetch("https://returnyoutubedislikeapi.com/votes?videoId=" + (lastVideoId = videoId))
|
||||
.then(resp => resp.json())
|
||||
.then(data => document.getElementById("output").innerText = "Likes=" + data.likes + " Dislikes=" + data.dislikes);
|
||||
fetch(
|
||||
"https://returnyoutubedislikeapi.com/votes?videoId=" +
|
||||
(lastVideoId = videoId)
|
||||
)
|
||||
.then((resp) => resp.json())
|
||||
.then(
|
||||
(data) =>
|
||||
(document.getElementById("output").innerText =
|
||||
"Likes=" + data.likes + " Dislikes=" + data.dislikes)
|
||||
);
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
+17
-7
@@ -37,7 +37,7 @@
|
||||
</a>
|
||||
</p>
|
||||
<!-- Translators -->
|
||||
<div style="color: #555; width: 250px" class="my-8">
|
||||
<div style="color: #555; width: 250px" class="my-8">
|
||||
<b class="white--text">
|
||||
{{ $vuetify.lang.t("$vuetify.links.translators") }}
|
||||
</b>
|
||||
@@ -57,11 +57,13 @@
|
||||
</b>
|
||||
<br />
|
||||
<div
|
||||
v-for="project in coolProjects"
|
||||
:key="project.url"
|
||||
class="d-flex justify-center"
|
||||
v-for="project in coolProjects"
|
||||
:key="project.url"
|
||||
class="d-flex justify-center"
|
||||
>
|
||||
<a class="attr-link" :href="project.url" target="_blank">{{ project.name }} - {{ $vuetify.lang.t(project.description) }} </a>
|
||||
<a class="attr-link" :href="project.url" target="_blank"
|
||||
>{{ project.name }} - {{ $vuetify.lang.t(project.description) }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -113,8 +115,16 @@ export default {
|
||||
},
|
||||
],
|
||||
coolProjects: [
|
||||
{ name: "SponsorBlock", url: "https://sponsor.ajay.app/", description: "$vuetify.links.sponsorBlockDescription" },
|
||||
{ name: "Filmot", url: "https://filmot.com/", description: "$vuetify.links.filmotDescription" }
|
||||
{
|
||||
name: "SponsorBlock",
|
||||
url: "https://sponsor.ajay.app/",
|
||||
description: "$vuetify.links.sponsorBlockDescription",
|
||||
},
|
||||
{
|
||||
name: "Filmot",
|
||||
url: "https://filmot.com/",
|
||||
description: "$vuetify.links.filmotDescription",
|
||||
},
|
||||
],
|
||||
}),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user