Skip to content

Commit

Permalink
Add website and donation link
Browse files Browse the repository at this point in the history
  • Loading branch information
hanydd committed Aug 12, 2024
1 parent 0d09f76 commit 5477466
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 49 deletions.
4 changes: 2 additions & 2 deletions public/help/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
<a href="https://github.com/HanYaodong">
Han Yaodong
</a>
<!-- <a href="https://sponsor.ajay.app/donate" target="_blank" rel="noopener" id="sbDonate">
<a href="https://bsbsb.top/donate/" target="_blank" rel="noopener" id="sbDonate">
(捐赠)
</a> -->
</a>
<br />
<span>交流群:371384235</span>
</p>
Expand Down
44 changes: 4 additions & 40 deletions public/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,54 +180,18 @@ <h1 class="sbHeader" style="padding: 8px 15px">__MSG_yourWork__</h1>
</p>
</div>

<!-- <div
id="sponsorTimesDonateContainer"
style="display: none; align-items: center; justify-content: center"
>
<img class="sbHeart" src="/icons/heart.svg" alt="Heart icon" />
<a
id="sbConsiderDonateLink"
href="https://sponsor.ajay.app/donate"
target="_blank"
rel="noopener"
>
__MSG_considerDonating__
</a>
<img
id="sbCloseDonate"
src="/icons/close.png"
alt="__MSG_closeIcon__"
height="8"
style="padding-left: 5px; cursor: pointer"
/>
</div> -->

<footer id="sbFooter">
<a id="helpButton">__MSG_help__</a>
<!-- <a href="https://sponsor.ajay.app" target="_blank" rel="noopener"
>__MSG_website__</a
>
<a href="https://sponsor.ajay.app/stats" target="_blank" rel="noopener"
>__MSG_viewLeaderboard__</a
>
<br /> -->
<a href="https://bsbsb.top" target="_blank" rel="noopener">__MSG_website__</a>
<a href="https://bsbsb.top/stats" target="_blank" rel="noopener">__MSG_viewLeaderboard__</a>
<br />
<a href="https://github.com/HanYaodong/BilibiliSponsorBlock" target="_blank" rel="noopener">
__MSG_projectRepo__
</a>
<a href="https://status.bsbsb.top" target="_blank" rel="noopener">
__MSG_serverStatus__
</a>
<!--
<a href="https://discord.gg/SponsorBlock" target="_blank" rel="noopener"
>Discord</a
>
<a
href="https://matrix.to/#/#sponsor:ajay.app?via=ajay.app&via=matrix.org&via=mozilla.org"
target="_blank"
rel="noopener"
>Matrix</a
> -->
<a href="https://sponsor.ajay.app/donate" target="_blank" rel="noopener" id="sbDonate">__MSG_Donate__</a>
<a href="https://bsbsb.top/donate/" target="_blank" rel="noopener" id="sbDonate">__MSG_Donate__</a>
</footer>

<button id="showNoticeAgain" style="display: none">
Expand Down
14 changes: 7 additions & 7 deletions src/popup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Config from "./config";

import { StorageChangesObject } from "./config/config";
import { showDonationLink } from "./config/configUtils";
import {
GetChannelIDResponse,
IsChannelWhitelistedResponse,
Expand All @@ -11,11 +13,9 @@ import {
SponsorStartResponse,
VoteResponse,
} from "./messageTypes";
import { ActionType, SegmentUUID, SponsorHideType, SponsorTime } from "./types";
// import { showDonationLink } from "./utils/configUtils";
import { StorageChangesObject } from "./config/config";
import GenericNotice from "./render/GenericNotice";
import { asyncRequestToServer, sendRequestToServer } from "./requests/requests";
import { ActionType, SegmentUUID, SponsorHideType, SponsorTime } from "./types";
import { waitFor } from "./utils/";
import { AnimationUtils } from "./utils/animationUtils";
import { shortCategoryName } from "./utils/categoryUtils";
Expand Down Expand Up @@ -192,10 +192,10 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
PageElements.sponsorBlockPopupBody.classList.add("is-embedded");
}

// Hide donate button if wanted (Safari, or user choice)
// if (!showDonationLink()) {
PageElements.sbDonate.style.display = "none";
// }
// Hide donate button if wanted
if (!showDonationLink()) {
PageElements.sbDonate.style.display = "none";
}
PageElements.sbDonate.addEventListener(
"click",
() => (Config.config.donateClicked = Config.config.donateClicked + 1)
Expand Down

0 comments on commit 5477466

Please sign in to comment.