mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-12-02 02:41:22 +01:00
3 files changed
+7
-4
No files matched your search
@@ -23,7 +23,7 @@ function doXHR(opts) {
|
|||||||
if (typeof GM_xmlhttpRequest === 'function') {
|
if (typeof GM_xmlhttpRequest === 'function') {
|
||||||
return GM_xmlhttpRequest(opts);
|
return GM_xmlhttpRequest(opts);
|
||||||
}
|
}
|
||||||
if (typeof GM !== 'undefined') /*This will prevent from throwing "Uncaught ReferenceError: GM is not defined"*/{
|
if (typeof GM !== 'undefined') /*This will prevent from throwing "Uncaught ReferenceError: GM is not defined"*/ {
|
||||||
if (typeof GM.xmlHttpRequest === 'function') {
|
if (typeof GM.xmlHttpRequest === 'function') {
|
||||||
return GM.xmlHttpRequest(opts);
|
return GM.xmlHttpRequest(opts);
|
||||||
}
|
}
|
||||||
@@ -194,7 +194,8 @@ function isVideoLoaded() {
|
|||||||
|
|
||||||
function roundDown(num) {
|
function roundDown(num) {
|
||||||
if (num < 1000) return num;
|
if (num < 1000) return num;
|
||||||
const decimal = Math.floor(Math.log10(num) - 1);
|
const int = Math.floor(Math.log10(num) - 2);
|
||||||
|
const decimal = int + (int % 3 ? 1 : 0);
|
||||||
const value = Math.floor(num / 10 ** decimal);
|
const value = Math.floor(num / 10 ** decimal);
|
||||||
return value * (10 ** decimal);
|
return value * (10 ** decimal);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,7 +139,8 @@
|
|||||||
|
|
||||||
function roundDown(num) {
|
function roundDown(num) {
|
||||||
if (num < 1000) return num;
|
if (num < 1000) return num;
|
||||||
const decimal = Math.floor(Math.log10(num) - 1);
|
const int = Math.floor(Math.log10(num) - 2);
|
||||||
|
const decimal = int + (int % 3 ? 1 : 0);
|
||||||
const value = Math.floor(num / 10 ** decimal);
|
const value = Math.floor(num / 10 ** decimal);
|
||||||
return value * (10 ** decimal);
|
return value * (10 ** decimal);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,7 +135,8 @@ function isVideoLoaded() {
|
|||||||
|
|
||||||
function roundDown(num) {
|
function roundDown(num) {
|
||||||
if (num < 1000) return num;
|
if (num < 1000) return num;
|
||||||
const decimal = Math.floor(Math.log10(num) - 1);
|
const int = Math.floor(Math.log10(num) - 2);
|
||||||
|
const decimal = int + (int % 3 ? 1 : 0);
|
||||||
const value = Math.floor(num / 10 ** decimal);
|
const value = Math.floor(num / 10 ** decimal);
|
||||||
return value * (10 ** decimal);
|
return value * (10 ** decimal);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user