This commit is contained in:
Front committed 2022-01-10 18:26:35 -05:00
1 parent 0e455887f8
commit 1a49ceb0fe
3 files changed
+188 -152

No files matched your search

+2 -2
View File
@@ -31,14 +31,14 @@ export default {
apiUrl: "https://returnyoutubedislikeapi.com", apiUrl: "https://returnyoutubedislikeapi.com",
}, },
server: { host: '0.0.0.0', port: 80 }, //LINE FOR DEBUGGING ONLY server: { host: "0.0.0.0", port: 80 }, //LINE FOR DEBUGGING ONLY
target: "static", target: "static",
css: [], css: [],
plugins: [], plugins: [],
components: true, components: true,
buildModules: ["@nuxtjs/vuetify"], buildModules: ["@nuxtjs/vuetify"],
modules: ['@nuxtjs/axios','nuxt-user-agent'], modules: ["@nuxtjs/axios", "nuxt-user-agent"],
// Vuetify module configuration: https://go.nuxtjs.dev/config-vuetify // Vuetify module configuration: https://go.nuxtjs.dev/config-vuetify
vuetify: { vuetify: {
+185 -148
View File
@@ -1,215 +1,252 @@
<template> <template>
<div> <div>
<v-stepper :value="progress" class="mt-12" outlined max-width="800px"> <v-stepper :value="progress" class="mt-12" outlined max-width="800px">
<v-stepper-header> <v-stepper-header>
<v-stepper-step step="1" :complete="steps.one">Setup</v-stepper-step> <v-stepper-step step="1" :complete="steps.one">Setup</v-stepper-step>
<v-divider /> <v-divider />
<v-stepper-step step="2" :complete="steps.two">Extension Status</v-stepper-step> <v-stepper-step step="2" :complete="steps.two"
>Extension Status</v-stepper-step
>
<v-divider /> <v-divider />
<v-stepper-step step="3" :complete="steps.three">Server Connection</v-stepper-step> <v-stepper-step step="3" :complete="steps.three"
>Server Connection</v-stepper-step
>
<v-divider /> <v-divider />
<v-stepper-step step="4" :complete="steps.four">Browser Support</v-stepper-step> <v-stepper-step step="4" :complete="steps.four"
>Browser Support</v-stepper-step
>
<v-divider /> <v-divider />
<v-stepper-step step="5" :complete="steps.five">Report</v-stepper-step> <v-stepper-step step="5" :complete="steps.five">Report</v-stepper-step>
</v-stepper-header> </v-stepper-header>
<v-stepper-content step="1"> <v-stepper-content step="1">
<h1>Getting Ready...</h1> <h1>Getting Ready...</h1>
<v-progress-circular indeterminate size="50" width="5" color="primary" /> <v-progress-circular
indeterminate
size="50"
width="5"
color="primary"
/>
</v-stepper-content> </v-stepper-content>
<v-stepper-content step="2"> <v-stepper-content step="2">
<h1>Ensuring the Extension is Running...</h1> <h1>Ensuring the Extension is Running...</h1>
<v-progress-circular indeterminate size="50" width="5" color="primary" /> <v-progress-circular
indeterminate
size="50"
width="5"
color="primary"
/>
</v-stepper-content> </v-stepper-content>
<v-stepper-content step="3"> <v-stepper-content step="3">
<h1>Testing Server Connection...</h1> <h1>Testing Server Connection...</h1>
<v-progress-circular indeterminate size="50" width="5" color="primary" /> <v-progress-circular
indeterminate
size="50"
width="5"
color="primary"
/>
</v-stepper-content> </v-stepper-content>
<v-stepper-content step="4"> <v-stepper-content step="4">
<h1>Checking Browser Information...</h1> <h1>Checking Browser Information...</h1>
<v-progress-circular indeterminate size="50" width="5" color="primary" /> <v-progress-circular
indeterminate
size="50"
width="5"
color="primary"
/>
</v-stepper-content> </v-stepper-content>
<v-stepper-content step="5" style="text-align:left"> <v-stepper-content step="5" style="text-align: left">
<div class="reportHeader"> <div class="reportHeader">
<h1>Browser</h1> <h1>Browser</h1>
<v-divider style="transform: translateY(1.5em)" /> <v-divider style="transform: translateY(1.5em)" />
</div> </div>
<v-alert dense outlined v-text="notices.browser.text" :type="notices.browser.type" /> <v-alert
<span><b>BROWSER-</b> {{ userInformation.browser.name }}</span><br> dense
<span><b>VENDOR-</b> {{ userInformation.browser.vendor }} </span><br> outlined
<span><b>VERSION-</b> {{ userInformation.browser.version }}</span><br> :type="notices.browser.type"
v-text="notices.browser.text"
/>
<span><b>BROWSER-</b> {{ userInformation.browser.name }}</span
><br />
<span><b>VENDOR-</b> {{ userInformation.browser.vendor }} </span><br />
<span><b>VERSION-</b> {{ userInformation.browser.version }}</span
><br />
<div class="reportHeader"> <div class="reportHeader">
<h1>System</h1> <h1>System</h1>
<v-divider style="transform: translateY(1.5em)" /> <v-divider style="transform: translateY(1.5em)" />
</div> </div>
<v-alert dense outlined v-text="notices.system.text" :type="notices.system.type" /> <v-alert
<span><b>OS-</b> {{ userInformation.system.os }}</span><br> dense
<span><b>VERSION-</b> {{ userInformation.system.version }} </span><br> outlined
<span><b>TYPE-</b> {{ userInformation.system.type }}</span><br> :type="notices.system.type"
v-text="notices.system.text"
/>
<span><b>OS-</b> {{ userInformation.system.os }}</span
><br />
<span><b>VERSION-</b> {{ userInformation.system.version }} </span><br />
<span><b>TYPE-</b> {{ userInformation.system.type }}</span
><br />
<div class="reportHeader"> <div class="reportHeader">
<h1>Extension</h1> <h1>Extension</h1>
<v-divider style="transform: translateY(1.5em)" /> <v-divider style="transform: translateY(1.5em)" />
</div> </div>
<v-alert dense outlined v-text="notices.extension.text" :type="notices.extension.type" /> <v-alert
<span><b>LATEST EXTENSION VERSION-</b> {{ userInformation.extension.latestExtensionVersion || "Failed to lookup data" }}</span><br> dense
<span><b>SERVER CONNECTION-</b> {{ userInformation.extension.serverConnection ? "Working" : "Failed to connect" }}</span><br> outlined
:type="notices.extension.type"
v-text="notices.extension.text"
/>
<span
><b>LATEST EXTENSION VERSION-</b>
{{
userInformation.extension.latestExtensionVersion ||
"Failed to lookup data"
}}</span
><br />
<span
><b>SERVER CONNECTION-</b>
{{
userInformation.extension.serverConnection
? "Working"
: "Failed to connect"
}}</span
><br />
</v-stepper-content> </v-stepper-content>
</v-stepper> </v-stepper>
</div> </div>
</template> </template>
<style scoped> <style scoped>
.reportHeader { .reportHeader {
display: flex; display: flex;
margin-top: 1em; margin-top: 1em;
} }
</style> </style>
<script> <script>
export default { export default {
data() { data() {
return { return {
stepTime: 2500, stepTime: 2500,
supportedBrowsers: ["Firefox", "Chrome", "Brave", "Edge", "Opera"], supportedBrowsers: ["Firefox", "Chrome", "Brave", "Edge", "Opera"],
progress: 1, progress: 1,
steps: { steps: {
one: false, one: false,
two: false, two: false,
three: false, three: false,
four: false, four: false,
five: false, five: false,
},
userInformation: {
browser: {
name: this.$ua._parsed.name,
vendor: this.$ua._parsed.vendor,
version: this.$ua._parsed.version,
}, },
system: {
userInformation: { os: this.$ua._parsed.os,
browser: { version: this.$ua._parsed.os_version,
name: this.$ua._parsed.name, type: this.$ua._parsed.category,
vendor: this.$ua._parsed.vendor,
version: this.$ua._parsed.version
},
system: {
os: this.$ua._parsed.os,
version: this.$ua._parsed.os_version,
type: this.$ua._parsed.category
},
extension: {
serverConnection: null,
latestExtensionVersion: null,
},
}, },
extension: {
serverConnection: null,
latestExtensionVersion: null,
},
},
notices: { notices: {
system: { system: {
text: null, text: null,
type: null type: null,
}, },
browser: { browser: {
text: null, text: null,
type: null type: null,
}, },
extension: { extension: {
text: null, text: null,
type: null type: null,
} },
} },
};
},
} mounted() {
}, //--- Init Stuff ---//
setTimeout(() => {
mounted() { this.$axios
//--- Init Stuff ---// .$get(
setTimeout(() => { "https://raw.githubusercontent.com/Anarios/return-youtube-dislike/main/Extensions/combined/manifest-chrome.json"
)
this.$axios.$get('https://raw.githubusercontent.com/Anarios/return-youtube-dislike/main/Extensions/combined/manifest-chrome.json') .then((res) => {
.then(res => {
this.userInformation.extension.latestExtensionVersion = res.version; this.userInformation.extension.latestExtensionVersion = res.version;
});
this.progress++;
this.steps.one = true;
}, this.stepTime);
//--- Check If Extension Is Running ---//
setTimeout(() => {
this.progress++;
this.steps.two = true;
}, this.stepTime * 2);
//--- Check Server Connection ---//
setTimeout(() => {
this.$axios
.$get("https://returnyoutubedislikeapi.com/votes?videoId=QOFEgexls14")
.then(() => {
this.userInformation.extension.serverConnection = true;
}) })
.catch(() => {
this.userInformation.extension.serverConnection = false;
});
this.progress++;
this.steps.three = true;
}, this.stepTime * 3);
this.progress++; setTimeout(() => {
this.steps.one = true; this.progress++;
}, this.stepTime); this.steps.four = true;
//this.steps.five = true;
//--- Check If Extension Is Running ---// //--- Parse Extension Data ---//
setTimeout(() => { this.notices.extension.text = `We are unable to automatically check that your extension is up to date. Please check that the number below matches your extension version.`;
this.progress++; this.notices.extension.type = "warning";
this.steps.two = true;
}, this.stepTime * 2);
//--- Check Server Connection ---// if (this.userInformation.extension.serverConnection != true) {
setTimeout(() => { this.notices.extension.text = `Failed to connect to the server!`;
this.$axios.$get('https://returnyoutubedislikeapi.com/votes?videoId=QOFEgexls14') this.notices.extension.type = "error";
.then(res => { }
this.userInformation.extension.serverConnection = true;
})
.catch(err => {
this.userInformation.extension.serverConnection = false;
})
//--- Parse System Compatibility ---//
this.notices.system.text = `${this.userInformation.system.os} is supported!`;
this.notices.system.type = "success";
this.progress++; if (this.userInformation.system.type != "pc") {
this.steps.three = true; this.notices.system.text = `"${this.userInformation.system.type}" may not be a supported device type!`;
}, this.stepTime * 3); this.notices.system.type = "warning";
}
setTimeout(() => { //--- Parse Browser Compatibility ---//
this.progress++; this.notices.browser.text = `${this.userInformation.browser.name} ${this.userInformation.browser.version} is supported!`;
this.steps.four = true; this.notices.browser.type = "success";
//this.steps.five = true;
//--- Parse Extension Data ---//
this.notices.extension.text = `We are unable to automatically check that your extension is up to date. Please check that the number below matches your extension version.`;
this.notices.extension.type = "warning";
if (this.userInformation.extension.serverConnection != true) {
this.notices.extension.text = `Failed to connect to the server!`;
this.notices.extension.type = "error";
}
//--- Parse System Compatibility ---//
this.notices.system.text = `${this.userInformation.system.os} is supported!`;
this.notices.system.type = "success";
if (this.userInformation.system.type != "pc") {
this.notices.system.text = `"${this.userInformation.system.type}" may not be a supported device type!`;
this.notices.system.type = "warning";
}
//--- Parse Browser Compatibility ---//
this.notices.browser.text = `${this.userInformation.browser.name} ${this.userInformation.browser.version} is supported!`;
this.notices.browser.type = "success";
if (!this.supportedBrowsers.includes(this.userInformation.browser.name)) {
this.notices.browser.text = `${this.userInformation.browser.name} is not a supported browser! You may continue to use the extension, but we don't provide official support.`;
this.notices.browser.type = "warning";
}
}, this.stepTime * 4);
}
}
if (!this.supportedBrowsers.includes(this.userInformation.browser.name)) {
this.notices.browser.text = `${this.userInformation.browser.name} is not a supported browser! You may continue to use the extension, but we don't provide official support.`;
this.notices.browser.type = "warning";
}
}, this.stepTime * 4);
},
};
</script> </script>
+1 -2
View File
@@ -49,8 +49,7 @@ export default {
"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. The extension then displays the dislike count and ratio on the page. If you like or dislike a video, that is recorded and sent to the database so an accurate dislike count can be extrapolated.", "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. The extension then displays the dislike count and ratio on the page. If you like or dislike a video, that is recorded and sent to the database so an accurate dislike count can be extrapolated.",
}, },
{ {
question: "Can I share my dislike count with you?",
question:"Can I share my dislike count with you?",
answer: answer:
"Coming soon. We are looking into using Oauth or a different read only API with a limited scope so creators can share their dislike counts verifiability. ", "Coming soon. We are looking into using Oauth or a different read only API with a limited scope so creators can share their dislike counts verifiability. ",