wgt-node-utils 1.2.40 → 1.2.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +1 -1
- package/package.json +1 -1
- package/src/index.js +16 -40
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -702,53 +702,29 @@ class wgtNodeUtils {
|
|
|
702
702
|
let self = this
|
|
703
703
|
try {
|
|
704
704
|
const res = await axios.get(url);
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
let policyTitle
|
|
710
|
-
if (lang === 'en') {
|
|
711
|
-
policyTitle = 'This Privacy Policy is effective [ Jan 5,], 2024 for all users.';
|
|
712
|
-
} else if (lang === 'es') {
|
|
713
|
-
policyTitle = '(Correo electrónico) JeriaBaldamina@gmail.com; (Nombre de la empresa) SUNSHOWER ADS PTE.LTD';
|
|
714
|
-
} else if (lang === 'pt') {
|
|
715
|
-
policyTitle = '(E-mail) JeriaBaldamina@gmail.com; (Nome da Empresa) SUNSHOWER ADS PTE.LTD ';
|
|
716
|
-
} else if (lang === 'it') {
|
|
717
|
-
policyTitle = 'La presente informativa sulla privacy è in vigore dal [5 gennaio], 2021 per tutti gli utenti.';
|
|
718
|
-
} else if (lang === 'fr') {
|
|
719
|
-
policyTitle = `(Adresse e-mail) JeriaBaldamina@gmail.com ; (Nom de l'entreprise) SUNSHOWER ADS PTE.LTD`;
|
|
720
|
-
}
|
|
721
|
-
if (lang === 'en') {
|
|
722
|
-
contactEmail = `<a href="mailto:${contactEmail}" target="">${contactEmail}</a>`
|
|
723
|
-
}
|
|
724
|
-
if (lang === 'es') {
|
|
725
|
-
contactEmail = `<a href="mailto:${contactEmail}" target="">(Correo electrónico) JeriaBaldamina@gmail.com; (Nombre de la empresa) SUNSHOWER ADS PTE.LTD</a>`;
|
|
726
|
-
} else if (lang === 'pt') {
|
|
727
|
-
contactEmail = `<a href="mailto:${contactEmail}" target="">(E-mail) JeriaBaldamina@gmail.com; (Nome da Empresa) SUNSHOWER ADS PTE.LTD</a>`;
|
|
728
|
-
} else if (lang === 'it') {
|
|
729
|
-
contactEmail = `<a href="mailto:${contactEmail}" target="">La presente informativa sulla privacy è in vigore dal [5 gennaio], 2021 per tutti gli utenti.</a>`;
|
|
730
|
-
} else if (lang === 'fr') {
|
|
731
|
-
contactEmail = `<a href="mailto:${contactEmail}" target="">(Adresse e-mail) JeriaBaldamina@gmail.com ; (Nom de l'entreprise) SUNSHOWER ADS PTE.LTD</a>`;
|
|
732
|
-
}
|
|
733
|
-
const txt = properties.txt || self.setPolicyText(hostname, policyTitle, lang);
|
|
734
|
-
|
|
735
|
-
// 构建结果
|
|
736
|
-
const data = {
|
|
737
|
-
contact: contactEmail,
|
|
738
|
-
title: title ? title : '',
|
|
739
|
-
txt: txt ? txt : '',
|
|
705
|
+
return res.data;
|
|
706
|
+
} catch (error) {
|
|
707
|
+
return {
|
|
708
|
+
txt: self.setPolicyText(hostname, "This Privacy Policy is effective [ Jan 5,], 2021 for all users."),
|
|
740
709
|
};
|
|
741
|
-
|
|
710
|
+
}
|
|
711
|
+
};
|
|
712
|
+
/**
|
|
713
|
+
*
|
|
714
|
+
* @param {string} url 获取自定义政策信息URL
|
|
715
|
+
* @param {string} hostname 网站域名
|
|
716
|
+
* @returns
|
|
717
|
+
*/
|
|
718
|
+
getSiteStaticContent = async (url) => {
|
|
719
|
+
try {
|
|
720
|
+
const res = await axios.get(url);
|
|
742
721
|
return data;
|
|
743
722
|
} catch (error) {
|
|
744
|
-
console.error("Error fetching policy and contact data:", error);
|
|
745
723
|
return {
|
|
746
|
-
contact: `<a href="mailto:gamebridgenoreply@gmail.com" target="">gamebridgenoreply@gmail.com</a>`,
|
|
747
|
-
title: '',
|
|
748
724
|
txt: self.setPolicyText(hostname, "This Privacy Policy is effective [ Jan 5,], 2021 for all users."),
|
|
749
725
|
};
|
|
750
726
|
}
|
|
751
|
-
}
|
|
727
|
+
}
|
|
752
728
|
|
|
753
729
|
/**
|
|
754
730
|
* 排除非法路径:检查字符串是否包含非法文件扩展或关键词
|