(function(){
  document.addEventListener('DOMContentLoaded', function(){
    var sel = document.getElementById('qc_store_mode');
    var fs  = document.getElementById('qc_redis_settings');
    if (!sel || !fs) return;
    function toggle(){
      var v = sel.value;
      fs.style.display = (v === 'redis') ? '' : 'none';
    }
    sel.addEventListener('change', toggle);
    toggle();
  });
})();