|
13 | 13 | // @description:zh-TW 將明星曆史圖表添加到 GitHub 存儲庫的側邊欄 |
14 | 14 | // @author Adam Lui |
15 | 15 | // @namespace https://github.com/adamlui |
16 | | -// @version 2026.7.13.1 |
| 16 | +// @version 2026.7.13.2 |
17 | 17 | // @license MIT |
18 | 18 | // @icon data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%2248%22%20height=%2248%22%20viewBox=%220%200%2048%2048%22%3E%3Cstyle%3E:root%7B--fill:%23000%7D@media%20(prefers-color-scheme:dark)%7B:root%7B--fill:%23fff%7D%7D%3C/style%3E%3Cpath%20fill=%22var(--fill)%22%20d=%22M24%201.9a21.6%2021.6%200%200%200-6.8%2042.2c1%20.2%201.8-.9%201.8-1.8v-2.9c-6%201.3-7.9-2.9-7.9-2.9a6.5%206.5%200%200%200-2.2-3.2c-2-1.4.1-1.3.1-1.3a4.3%204.3%200%200%201%203.3%202c1.7%202.9%205.5%202.6%206.7%202.1a5.4%205.4%200%200%201%20.5-2.9C12.7%2032%209%2028%209%2022.6a10.7%2010.7%200%200%201%202.9-7.6%206.2%206.2%200%200%201%20.3-6.4%208.9%208.9%200%200%201%206.4%202.9%2015.1%2015.1%200%200%201%205.4-.8%2017.1%2017.1%200%200%201%205.4.7%209%209%200%200%201%206.4-2.8%206.5%206.5%200%200%201%20.4%206.4%2010.7%2010.7%200%200%201%202.8%207.6c0%205.4-3.7%209.4-10.5%2010.6a5.4%205.4%200%200%201%20.5%202.9v6.2a1.8%201.8%200%200%200%201.9%201.8A21.7%2021.7%200%200%200%2024%201.9Z%22/%3E%3C/svg%3E |
19 | 19 | // @icon64 data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%2264%22%20height=%2264%22%20viewBox=%220%200%2048%2048%22%3E%3Cstyle%3E:root%7B--fill:%23000%7D@media%20(prefers-color-scheme:dark)%7B:root%7B--fill:%23fff%7D%7D%3C/style%3E%3Cpath%20fill=%22var(--fill)%22%20d=%22M24%201.9a21.6%2021.6%200%200%200-6.8%2042.2c1%20.2%201.8-.9%201.8-1.8v-2.9c-6%201.3-7.9-2.9-7.9-2.9a6.5%206.5%200%200%200-2.2-3.2c-2-1.4.1-1.3.1-1.3a4.3%204.3%200%200%201%203.3%202c1.7%202.9%205.5%202.6%206.7%202.1a5.4%205.4%200%200%201%20.5-2.9C12.7%2032%209%2028%209%2022.6a10.7%2010.7%200%200%201%202.9-7.6%206.2%206.2%200%200%201%20.3-6.4%208.9%208.9%200%200%201%206.4%202.9%2015.1%2015.1%200%200%201%205.4-.8%2017.1%2017.1%200%200%201%205.4.7%209%209%200%200%201%206.4-2.8%206.5%206.5%200%200%201%20.4%206.4%2010.7%2010.7%200%200%201%202.8%207.6c0%205.4-3.7%209.4-10.5%2010.6a5.4%205.4%200%200%201%20.5%202.9v6.2a1.8%201.8%200%200%200%201.9%201.8A21.7%2021.7%200%200%200%2024%201.9Z%22/%3E%3C/svg%3E |
|
25 | 25 | // @connect api.star-history.com |
26 | 26 | // @connect cdn.jsdelivr.net |
27 | 27 | // @connect scriptcat.org |
| 28 | +// @require https://cdn.jsdelivr.net/gh/adamlui/userscripts@ff2baba/assets/js/lib/css.js/dist/css.min.js#sha256-zf9s8C0cZ/i+gnaTIUxa0+RpDYpsJVlyuV5L2q4KUdA= |
28 | 29 | // @require https://cdn.jsdelivr.net/gh/adamlui/userscripts@ff2baba/assets/js/lib/dom.js/dist/dom.min.js#sha256-nTc2by3ZAz6AR7B8fOqjloJNETvjAepe15t2qlghMDo= |
29 | 30 | // @resource rpgCSS https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@727feff/assets/styles/rising-particles/dist/gray.min.css#sha256-48sEWzNUGUOP04ur52G5VOfGZPSnZQfrF3szUr4VaRs= |
30 | 31 | // @resource rpwCSS https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@727feff/assets/styles/rising-particles/dist/white.min.css#sha256-6xBXczm7yM1MZ/v0o1KVFfJGehHk47KJjq8oTktH4KE= |
|
360 | 361 | } |
361 | 362 | } |
362 | 363 | } |
363 | | - dom.addRisingParticles(modal) |
| 364 | + css.addRisingParticles(modal) |
364 | 365 |
|
365 | 366 | return modalContainer.id // if assignment used |
366 | 367 | } |
|
963 | 964 | [ // buttons |
964 | 965 | function checkForUpdates() { updateCheck() }, |
965 | 966 | function getSupport() { safeWinOpen(app.urls.support) }, |
966 | | - function discuss() { safeWinOpen(app.urls.discuss) } |
967 | | - ], null, 501) |
| 967 | + function discuss() { safeWinOpen(app.urls.discuss) }, |
| 968 | + function rateUs() { safeWinOpen(app.urls.review.scriptcat) } |
| 969 | + ], null, 549) |
968 | 970 |
|
969 | | - // Re-format buttons to include emojis + re-case + hide 'Dismiss' |
| 971 | + // Hack buttons |
970 | 972 | for (const button of document.getElementById(aboutAlertID).querySelectorAll('button')) { |
| 973 | + |
| 974 | + // Prepend emoji |
971 | 975 | if (/updates/i.test(button.textContent)) |
972 | 976 | button.textContent = '🚀 Check for Updates' |
973 | 977 | else if (/support/i.test(button.textContent)) |
974 | 978 | button.textContent = '🧠 Get Support' |
| 979 | + else if (/rate/i.test(button.textContent)) |
| 980 | + button.textContent = '⭐ Rate Us' |
975 | 981 | else if (/discuss/i.test(button.textContent)) |
976 | 982 | button.textContent = '🗨️ Discuss' |
| 983 | + |
977 | 984 | else button.style.display = 'none' // hide Dismiss button |
978 | 985 | } |
979 | 986 | }) |
|
0 commit comments