btnChatGPTWeb_Tab.addEventListener ported from v3.3.5
This commit is contained in:
parent
bdd4d7ffc7
commit
5e50b151c6
1 changed files with 7 additions and 2 deletions
|
|
@ -681,8 +681,13 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const btnChatGPTWeb_Tab = document.getElementById('btnChatGPTWeb_Tab');
|
const btnChatGPTWeb_Tab = document.getElementById('btnChatGPTWeb_Tab');
|
||||||
btnChatGPTWeb_Tab.addEventListener('click', () => {
|
btnChatGPTWeb_Tab.addEventListener('click', async () => {
|
||||||
browser.tabs.create({ url: 'https://chatgpt.com/' });
|
let prefs_mod = await browser.storage.sync.get({chatgpt_web_model: ''});
|
||||||
|
let model_opt = '';
|
||||||
|
if((prefs_mod.chatgpt_web_model != '') && (prefs_mod.chatgpt_web_model != undefined)){
|
||||||
|
model_opt = '?model=' + encodeURIComponent(prefs_mod.chatgpt_web_model).toLowerCase();
|
||||||
|
}
|
||||||
|
browser.tabs.create({ url: 'https://chatgpt.com/' + model_opt });
|
||||||
});
|
});
|
||||||
|
|
||||||
browser.runtime.getPlatformInfo().then(info => {
|
browser.runtime.getPlatformInfo().then(info => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue