From e5d4be6250484d97b83070855c4588ddcb48c993 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 1 May 2024 17:15:38 +0100 Subject: [PATCH] chore: Clarify usage of window fields in UIWindowRefer.js /puter/src/UI/UIWindowRefer.js 25:20 error 'gui_origin' is not defined no-undef 25:37 error 'user' is not defined no-undef 73:30 error 'socialLink' is not defined no-undef --- src/UI/UIWindowRefer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UI/UIWindowRefer.js b/src/UI/UIWindowRefer.js index a37f8e4fb..0d81dee50 100644 --- a/src/UI/UIWindowRefer.js +++ b/src/UI/UIWindowRefer.js @@ -22,7 +22,7 @@ import UIPopover from './UIPopover.js' async function UIWindowRefer(options){ let h = ''; - const url = `${gui_origin}/?r=${user.referral_code}`; + const url = `${window.gui_origin}/?r=${window.user.referral_code}`; h += `
`; h += `
×
`; @@ -70,7 +70,7 @@ async function UIWindowRefer(options){ $(el_window).find('.window-body .downloadable-link').val(url); $(el_window).find('.window-body .share-copy-link-on-social').on('click', function(e){ - const social_links = socialLink({url: url, title: i18n('refer_friends_social_media_c2a'), description: i18n('refer_friends_social_media_c2a')}); + const social_links = window.socialLink({url: url, title: i18n('refer_friends_social_media_c2a'), description: i18n('refer_friends_social_media_c2a')}); let social_links_html = ``; social_links_html += `
`;