Skip to content

Commit f21f92a

Browse files
committed
Condensed roundDown() ↞ [auto-sync from https://github.com/adamlui/youtube-classic]
1 parent 611ceae commit f21f92a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

youtube-classic/youtube-classic.user.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name YouTube™ Classic 📺 — (Remove rounded design + Return YouTube dislikes)
3-
// @version 2026.1.17.45
3+
// @version 2026.1.17.46
44
// @author Adam Lui, Magma_Craft, Anarios, JRWR, Fuim & hoothin
55
// @namespace https://github.com/adamlui
66
// @description Reverts YouTube to its classic design (before all the rounded corners & hidden dislikes) + redirects YouTube Shorts
@@ -1490,10 +1490,10 @@
14901490

14911491
function roundDown(num) {
14921492
if (num < 1000) return num
1493-
const int = Math.floor(Math.log10(num) - 2)
1494-
const decimal = int + (int % 3 ? 1 : 0)
1495-
const value = Math.floor(num / 10 ** decimal)
1496-
return value * 10 ** decimal
1493+
const int = Math.floor(Math.log10(num) -2),
1494+
decimal = int +( int % 3 != 0 ),
1495+
val = Math.floor(num /10 ** decimal)
1496+
return val *10 ** decimal
14971497
}
14981498

14991499
function numberFormat(numState) {

0 commit comments

Comments
 (0)