You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
JavaScript
var ai = {}
|
|
ai.toggle = function (){
|
|
if($('.ai-button').html().match(/check/i)){
|
|
ai.disable()
|
|
}else{
|
|
ai.enable()
|
|
|
|
}
|
|
sessionStorage.AI = _val
|
|
$('.ai-button').html (_icon)
|
|
$('.ai-status').html(_status).css({color:_color})
|
|
}
|
|
ai.enable = function (){
|
|
_val = 1
|
|
_status = 'Enabled'
|
|
_color = '#4682B4'
|
|
_icon = '<i class="fa-solid fa-check" style="color:green"></i>'
|
|
$('.ai-workbench-status').html('AI Enabled').css({'color':'#4682b4'})
|
|
sessionStorage.AI = _val
|
|
$('.ai-button').html (_icon)
|
|
$('.ai-status').html(_status).css({color:_color})
|
|
|
|
|
|
}
|
|
ai.disable = function (){
|
|
_val = 0
|
|
_status = 'Disabled'
|
|
_color = 'maroon'
|
|
_icon = '<i class="fa-solid fa-times" style="color:maroon"></i>'
|
|
$('.ai-workbench-status').html('AI Disabled').css({'color':'maroon'})
|
|
sessionStorage.AI = _val
|
|
$('.ai-button').html (_icon)
|
|
$('.ai-status').html(_status).css({color:_color})
|
|
|
|
} |