Skip to content

Commit 683f60a

Browse files
committed
Updated mobile repoBtnsDiv selector (fixes adamlui/github-star-history#151), added/improved logs ↞ [auto-sync from https://github.com/adamlui/github-star-history]
1 parent 42d2696 commit 683f60a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 4 additions & 4 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.4.14
16+
// @version 2026.4.14.1
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
@@ -512,7 +512,7 @@
512512

513513
// Insert div
514514
const aboutSection = document.querySelector('.BorderGrid-row:has(a[href$="/stargazers"])')
515-
if (!aboutSection) console.error('insertStarHistory() > About section not found')
515+
if (!aboutSection) console.error('insertStarHistory() > aboutSection not found')
516516
else aboutSection.insertAdjacentElement('afterend', starHistoryDiv)
517517

518518
// Add top button to show chart on phones
@@ -524,8 +524,8 @@
524524

525525
function insertPhoneBtn(imgDataURL) {
526526
if (document.getElementById('zoomStarHistoryBtn')) return
527-
const repoBtnsDiv = document.querySelector('#responsive-meta-container .d-flex.gap-2.mt-n3.mb-3.flex-wrap')
528-
if (!repoBtnsDiv) return
527+
const repoBtnsDiv = document.querySelector('#responsive-meta-container > div > div')
528+
if (!repoBtnsDiv) return console.error('insertPhoneBtn() > repoBtnsDiv not found')
529529

530530
// Create/config button elems
531531
const zoomStarHistoryBtn = document.createElement('button')

0 commit comments

Comments
 (0)