Copied'); setTimeout(() => $button.html('Copy Link'), 2000); } catch (err) { console.error('Copy failed:', err); } finally { $temp.remove(); } }); // 社交媒体分享 $('.share-facebook').click(function() { const url = encodeURIComponent(window.location.href); window.open(`https://www.facebook.com/sharer/sharer.php?u=${url}`, '_blank'); }); $('.share-twitter').click(function() { const url = encodeURIComponent(window.location.href); const text = encodeURIComponent("Check out this great deal!"); window.open(`https://twitter.com/intent/tweet?text=${text}&url=${url}`, '_blank'); }); });