Skip to content

Commit dd2c3ba

Browse files
committed
fix: copy rss link with fallback on http context
1 parent 1e17a12 commit dd2c3ba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

webui/src/hooks/useBangumiRuleForm.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function useBangumiRuleForm(rule: Ref<BangumiRule>) {
5656

5757
async function copyRssLink(link: string) {
5858
if (!link) return;
59-
await copyText(link);
59+
await copyTextWithFallback(link);
6060
copied.value = true;
6161
clearTimeout(copyTimer);
6262
copyTimer = setTimeout(() => {
@@ -74,7 +74,7 @@ export function useBangumiRuleForm(rule: Ref<BangumiRule>) {
7474
* 注:回退方案已被标记为 deprecated,未来可能会被移除,所以并不能保证永远生效
7575
* @param text
7676
*/
77-
async function copyText(text: string): Promise<boolean> {
77+
async function copyTextWithFallback(text: string): Promise<boolean> {
7878
try {
7979
if (
8080
// 确认剪切板对象存在且当前为安全上下文

0 commit comments

Comments
 (0)