From c0cbc85ff9fb9c676e8ed8f938deba820e307781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20M=C3=A9ndez?= <45081533+FerMdez@users.noreply.github.com> Date: Fri, 4 Jun 2021 23:47:23 +0200 Subject: [PATCH] Add files via upload --- assets/js/cambiarCSS.js | 12 ++++-------- assets/php/common/changeCSS.php | 7 ++----- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/assets/js/cambiarCSS.js b/assets/js/cambiarCSS.js index 4ecf0f2..a2e161f 100644 --- a/assets/js/cambiarCSS.js +++ b/assets/js/cambiarCSS.js @@ -4,21 +4,17 @@ */ function cambiarCSS(nuevo){ - /* if(nuevo.includes("main.css")){ - var viejo = "{$prefix}assets/css/highContrast.css"; - var oldName = "Alto Contraste"; + var css = "main.css"; } else { - var viejo = "{$prefix}assets/css/main.css"; - var oldName = "Contrast Normal"; + var css = "highContrast.css"; } - */ - var url = "../assets/php/common/changeCSS.php?css=" + nuevo; + var url = "../assets/php/common/changeCSS.php?css=" + css; $.get(url); /* La idea era que cambiase todo dinámicamente sin refrescar la página */ - //document.getElementById('estilo').setAttribute('href', nuevo); + document.getElementById('estilo').setAttribute('href', nuevo); //document.getElementById('cssChange').innerHTML = oldName; //document.getElementById('cssChange').setAttribute('onClick', 'cambiarCSS('+viejo+')'); diff --git a/assets/php/common/changeCSS.php b/assets/php/common/changeCSS.php index 1dcd658..e015d3f 100644 --- a/assets/php/common/changeCSS.php +++ b/assets/php/common/changeCSS.php @@ -1,9 +1,6 @@ \ No newline at end of file