mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 01:26:11 -08:00
⚙ Settings #779
This commit is contained in:
@@ -1135,6 +1135,35 @@ function arraysContainSameValues(arr1, arr2) {
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Hide elements on the page based on the supplied setting
|
||||
function hideUIelements(settingKey) {
|
||||
|
||||
hiddenSectionsSetting = getSetting(settingKey)
|
||||
|
||||
if(hiddenSectionsSetting != "") // handle if settings not yet initialized
|
||||
{
|
||||
|
||||
sectionsArray = createArray(hiddenSectionsSetting)
|
||||
|
||||
// remove spaces to get IDs
|
||||
var newArray = $.map(sectionsArray, function(value) {
|
||||
return value.replace(/\s/g, '');
|
||||
});
|
||||
|
||||
$.each(newArray, function(index, hiddenSection) {
|
||||
|
||||
if($('#' + hiddenSection))
|
||||
{
|
||||
$('#' + hiddenSection).hide()
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// apply dark mode
|
||||
|
||||
Reference in New Issue
Block a user