|
70 | 70 | // @description:en Youtube Tools All in one local Download mp4, MP3 HIGT QUALITY
|
71 | 71 | // @description Youtube Tools All in one local Download mp4, MP3 HIGT QUALITY
|
72 | 72 | // @homepage https://github.com/DeveloperMDCM/
|
73 |
| -// @version 2.3.4.1 |
| 73 | +// @version 2.3.4.3 |
74 | 74 | // @author DeveloperMDCM
|
75 | 75 | // @match *://www.youtube.com/*
|
76 | 76 | // @exclude *://music.youtube.com/*
|
|
1670 | 1670 |
|
1671 | 1671 |
|
1672 | 1672 |
|
1673 |
| - function checkDarkModeActive() { |
1674 |
| - const prefCookie = document.cookie.split('; ').find(row => row.startsWith('PREF=')); |
1675 |
| - let theme = 'light'; |
1676 |
| - if (prefCookie) { |
1677 |
| - const params = new URLSearchParams(prefCookie.split('&').join('&')); |
1678 |
| - const f1Value = params.get('f6'); |
1679 |
| - // themes dark active os or youtube |
1680 |
| - // - 4000000 |
1681 |
| - // - 40000400 |
1682 |
| - // - 400 |
1683 |
| - if (f1Value === '4000000' || f1Value === '40000400' || f1Value === '400') { |
1684 |
| - theme = 'dark'; |
1685 |
| - } |
1686 |
| - } |
1687 |
| - return theme; |
1688 |
| -} |
| 1673 | + function checkDarkModeActive() { |
| 1674 | + const pref = document.cookie.split('; ').find(c => c.startsWith('PREF=')); |
| 1675 | + if (!pref) return 'light'; |
| 1676 | + |
| 1677 | + const params = new URLSearchParams(pref.split('&').join('&')); |
| 1678 | + const darkModes = ['400', '4000000', '40000400', '40000000']; |
| 1679 | + return darkModes.includes(params.get('f6')) ? 'dark' : 'light'; |
| 1680 | + } |
| 1681 | + |
1689 | 1682 | let isDarkModeActive = checkDarkModeActive();
|
1690 | 1683 |
|
1691 | 1684 |
|
|
2040 | 2033 | <div class="developer-mdcm">
|
2041 | 2034 | Developed by <a href="https://github.com/DeveloperMDCM" target="_blank">DeveloperMDCM</a>
|
2042 | 2035 | </div>
|
2043 |
| - <span style="color: #fff" ;>v2.3.4.1</span> |
| 2036 | + <span style="color: #fff" ;>v2.3.4.2</span> |
2044 | 2037 | </div>
|
2045 | 2038 | `;
|
2046 | 2039 | const panelHTML = policy
|
|
3776 | 3769 |
|
3777 | 3770 | console.log(
|
3778 | 3771 | '%cYoutube Tools Extension NEW UI\n' +
|
3779 |
| - '%cRun %c(v2.3.4.1)\n' + |
| 3772 | + '%cRun %c(v2.3.4.2)\n' + |
3780 | 3773 | 'By: DeveloperMDCM.',
|
3781 | 3774 | HEADER_STYLE,
|
3782 | 3775 | CODE_STYLE,
|
|
0 commit comments