Auto-deploy: 2026-05-17 21:47:20
This commit is contained in:
10
content.js
10
content.js
@@ -931,7 +931,15 @@ Brief honest assessment of this opportunity for my profile`
|
|||||||
|
|
||||||
function getSettings() {
|
function getSettings() {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
chrome.storage.sync.get(['apiKey', 'userProfile', 'language'], resolve);
|
chrome.storage.sync.get(['apiKey', 'userProfile', 'language'], (data) => {
|
||||||
|
if (data.userProfile && (data.userProfile.includes('hamzaayed@intaleqapp.com') || data.userProfile.includes('hamzaayedflutter@gmail.com'))) {
|
||||||
|
data.userProfile = data.userProfile
|
||||||
|
.replace(/hamzaayed@intaleqapp\.com/g, 'hamzaayed@tripz-egypt.com')
|
||||||
|
.replace(/hamzaayedflutter@gmail\.com/g, 'hamzaayed@tripz-egypt.com');
|
||||||
|
chrome.storage.sync.set({ userProfile: data.userProfile });
|
||||||
|
}
|
||||||
|
resolve(data);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
10
popup.js
10
popup.js
@@ -39,8 +39,14 @@ function loadSettings() {
|
|||||||
document.getElementById('api-key-input').value = data.apiKey;
|
document.getElementById('api-key-input').value = data.apiKey;
|
||||||
setKeyStatus('ok');
|
setKeyStatus('ok');
|
||||||
}
|
}
|
||||||
document.getElementById('profile-textarea').value =
|
let profile = data.userProfile || DEFAULT_PROFILE;
|
||||||
data.userProfile || DEFAULT_PROFILE;
|
if (profile.includes('hamzaayed@intaleqapp.com') || profile.includes('hamzaayedflutter@gmail.com')) {
|
||||||
|
profile = profile
|
||||||
|
.replace(/hamzaayed@intaleqapp\.com/g, 'hamzaayed@tripz-egypt.com')
|
||||||
|
.replace(/hamzaayedflutter@gmail\.com/g, 'hamzaayed@tripz-egypt.com');
|
||||||
|
chrome.storage.sync.set({ userProfile: profile });
|
||||||
|
}
|
||||||
|
document.getElementById('profile-textarea').value = profile;
|
||||||
document.getElementById('lang-select').value =
|
document.getElementById('lang-select').value =
|
||||||
data.language || 'auto';
|
data.language || 'auto';
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user