diff --git a/app/src/config/bazaar.ts b/app/src/config/bazaar.ts index eb294f5c3..ab878fedd 100644 --- a/app/src/config/bazaar.ts +++ b/app/src/config/bazaar.ts @@ -8,7 +8,7 @@ import {Constants} from "../constants"; import * as path from "path"; /// #endif import {getFrontend, isBrowser} from "../util/functions"; -import {setStorageVal} from "../protyle/util/compatibility"; +import {setStorageVal, writeText} from "../protyle/util/compatibility"; import {hasClosestByAttribute, hasClosestByClassName} from "../protyle/util/hasClosest"; import {Plugin} from "../plugin"; import {App} from "../index"; @@ -230,6 +230,17 @@ export const bazaar = {
`; }, + _genFundingHTML(funding: string): string { + if (!funding) { + return ""; + } + const isLink = funding.startsWith("http://") || funding.startsWith("https://"); + if (isLink) { + return ``; + } else { + return ``; + } + }, _genCardHTML(item: IBazaarItem, bazaarType: TBazaarType) { let hide = false; let themeMode = ""; @@ -273,7 +284,7 @@ export const bazaar = { ${item.downloads} - ${item.preferredFunding ? `` : ""} + ${item.preferredFunding ? `${bazaar._genFundingHTML(item.preferredFunding)}` : ""} @@ -310,7 +321,7 @@ export const bazaar = {