Skip to content

Commit c048815

Browse files
committed
Updated addRisingParticles() namespace, added Rate Us button to About modal (closes #254) ↞ [auto-sync from https://github.com/adamlui/github-star-history]
1 parent 597c2ab commit c048815

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

github-star-history/github-star-history.user.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// @description:zh-TW 將明星曆史圖表添加到 GitHub 存儲庫的側邊欄
1414
// @author Adam Lui
1515
// @namespace https://github.com/adamlui
16-
// @version 2026.7.13.1
16+
// @version 2026.7.13.2
1717
// @license MIT
1818
// @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
1919
// @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,6 +25,7 @@
2525
// @connect api.star-history.com
2626
// @connect cdn.jsdelivr.net
2727
// @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=
2829
// @require https://cdn.jsdelivr.net/gh/adamlui/userscripts@ff2baba/assets/js/lib/dom.js/dist/dom.min.js#sha256-nTc2by3ZAz6AR7B8fOqjloJNETvjAepe15t2qlghMDo=
2930
// @resource rpgCSS https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@727feff/assets/styles/rising-particles/dist/gray.min.css#sha256-48sEWzNUGUOP04ur52G5VOfGZPSnZQfrF3szUr4VaRs=
3031
// @resource rpwCSS https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@727feff/assets/styles/rising-particles/dist/white.min.css#sha256-6xBXczm7yM1MZ/v0o1KVFfJGehHk47KJjq8oTktH4KE=
@@ -360,7 +361,7 @@
360361
}
361362
}
362363
}
363-
dom.addRisingParticles(modal)
364+
css.addRisingParticles(modal)
364365

365366
return modalContainer.id // if assignment used
366367
}
@@ -963,17 +964,23 @@
963964
[ // buttons
964965
function checkForUpdates() { updateCheck() },
965966
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)
968970

969-
// Re-format buttons to include emojis + re-case + hide 'Dismiss'
971+
// Hack buttons
970972
for (const button of document.getElementById(aboutAlertID).querySelectorAll('button')) {
973+
974+
// Prepend emoji
971975
if (/updates/i.test(button.textContent))
972976
button.textContent = '🚀 Check for Updates'
973977
else if (/support/i.test(button.textContent))
974978
button.textContent = '🧠 Get Support'
979+
else if (/rate/i.test(button.textContent))
980+
button.textContent = '⭐ Rate Us'
975981
else if (/discuss/i.test(button.textContent))
976982
button.textContent = '🗨️ Discuss'
983+
977984
else button.style.display = 'none' // hide Dismiss button
978985
}
979986
})

0 commit comments

Comments
 (0)