Accessing quality settings in-game

I wanted to know if there was any way in which I could access specific quality settings (like shadow cascades) with javascript so I could create an in-game options menu. I only wish to know how to set a variable that is in the quality settings menu.