feat: 接入hotmail api对接与跨域规则
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
root.HotmailUtils = factory();
|
||||
})(typeof self !== 'undefined' ? self : globalThis, function createHotmailUtils() {
|
||||
const HOTMAIL_MAIL_API_URL = 'https://apple.882263.xyz/api/mail-new';
|
||||
const HOTMAIL_SERVICE_MODE_REMOTE = 'remote';
|
||||
const HOTMAIL_SERVICE_MODE_LOCAL = 'local';
|
||||
|
||||
function normalizeText(value) {
|
||||
return String(value || '')
|
||||
@@ -25,6 +27,12 @@
|
||||
return Number.isFinite(timestamp) ? timestamp : 0;
|
||||
}
|
||||
|
||||
function normalizeHotmailServiceMode(rawValue = '') {
|
||||
return String(rawValue || '').trim().toLowerCase() === HOTMAIL_SERVICE_MODE_REMOTE
|
||||
? HOTMAIL_SERVICE_MODE_REMOTE
|
||||
: HOTMAIL_SERVICE_MODE_LOCAL;
|
||||
}
|
||||
|
||||
function extractVerificationCode(text) {
|
||||
const source = String(text || '');
|
||||
const matchCn = source.match(/(?:代码为|验证码[^0-9]*?)[\s::]*(\d{6})/i);
|
||||
@@ -368,6 +376,7 @@
|
||||
getHotmailVerificationPollConfig,
|
||||
getHotmailVerificationRequestTimestamp,
|
||||
isAuthorizedHotmailAccount,
|
||||
normalizeHotmailServiceMode,
|
||||
normalizeHotmailMailApiMessages,
|
||||
normalizeTimestamp,
|
||||
parseHotmailImportText,
|
||||
|
||||
Reference in New Issue
Block a user