Skip to content

Commit

Permalink
加入 threads-button
Browse files Browse the repository at this point in the history
  • Loading branch information
joe committed Dec 15, 2024
1 parent 18d94e0 commit f389bcc
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 7 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -764,4 +764,11 @@ ChatGPT 雖然很厲害,但也有它的極限,所以我們要加強自己的
送審日期:2024/12/14
通過日期:2024/12/16

- 加入 adLinks,隨機顯示廣告連結
- 加入 adLinks,隨機顯示廣告連結

### 1.3.8 版

送審日期:2024/12/16
通過日期:2024/12/18

- 加入 threads-button
40 changes: 35 additions & 5 deletions js/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,27 @@ const adLinks = [
${isTW ? '緻金工 DearFine' : 'DearFine'}
</a>
</div>`,
`<div class="buy-me-a-coffee">
<a href="https://www.buymeacoffee.com/Joe.lin" target="_blank">
<img style="scale: 0.9;" src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=Joe.lin&button_colour=FFDD00&font_colour=000000&font_family=Inter&outline_colour=000000&coffee_colour=ffffff?${new Date().getTime()}" />
</a>
</div>`,
`<div class="friend-links">
<a
id="pinkoi-button"
href="https://www.pinkoi.com/store/dearfine"
id="threads-button"
href="https://www.threads.net/@dearfine_metal"
target="_blank"
>
${isTW ? '緻金工 DearFine' : 'DearFine'}
</a>
</div>`,
`<div class="buy-me-a-coffee">
<a href="https://www.buymeacoffee.com/Joe.lin" target="_blank">
<img style="scale: 0.9;" src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=Joe.lin&button_colour=FFDD00&font_colour=000000&font_family=Inter&outline_colour=000000&coffee_colour=ffffff?${new Date().getTime()}" />
`<div class="friend-links">
<a
id="pinkoi-button"
href="https://www.pinkoi.com/store/dearfine"
target="_blank"
>
${isTW ? '緻金工 DearFine' : 'DearFine'}
</a>
</div>`
]
Expand Down Expand Up @@ -1914,6 +1923,27 @@ function findGroupAndIndex(promptId) {
transform: translateY(-2px);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
#threads-button {
display: flex;
align-items: center;
justify-content: center;
background: #000000; /* Threads 主色調黑色 */
color: #ffffff; /* 白色文字 */
text-decoration: none;
padding: 10px 20px;
border-radius: 50px;
font-size: 14px;
font-weight: bold;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
transition: all 0.3s ease;
gap: 10px;
width: ${isTW ? '150px' : '100px'};
}
#threads-button:hover {
background: #333333; /* 提供更淺的黑色作為 hover 效果 */
transform: translateY(-2px);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
`;

// 插入 style
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "__MSG_extension_name__",
"description": "__MSG_extension_description__",
"author": "Joe",
"version": "1.3.7",
"version": "1.3.8",
"default_locale": "en",
"icons": {
"16": "images/icon/16.png",
Expand Down

0 comments on commit f389bcc

Please sign in to comment.