2
0

UIUserSettings.js 660 B

1234567891011121314151617181920212223242526272829303132
  1. for(const varname of ["$lcolor","$fcolor","$bcolor"])
  2. setup.Overwrite.varRegister(varname,undefined,((index,val)=>{setup.updateUIUserSettings(); return undefined;}));
  3. setup.updateUIUserSettings = () => {
  4. $(document).one(':passagedisplay', function (ev) {
  5. let css = `
  6. #passages,
  7. #sidebar{
  8. background:${QSP.$bcolor[0]};
  9. color:${QSP.$fcolor[0]};
  10. }
  11. #passages a,
  12. #sidebar a{
  13. color:${QSP.$lcolor[0]};
  14. }`;
  15. if(!QSP.SHOWSTAT[0]) css += `
  16. #sidebar{
  17. display: none;
  18. }
  19. `;
  20. if(!QSP.SHOWACTS[0]) css += `
  21. #actions{
  22. display: none;
  23. }
  24. `;
  25. $("#qspStyles").html(css);
  26. });
  27. }
  28. setup.updateUIUserSettings();