fixed deprecated link

This commit is contained in:
Lucien Cartier-Tilet 2019-11-27 11:32:46 +01:00
parent a20cfd1f37
commit 75f0b138cb
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
1 changed files with 5 additions and 5 deletions

View File

@ -43,16 +43,16 @@ function create_theme_switcher() {
$('body').append('<div class="themeBtn"><i class="fas fa-' $('body').append('<div class="themeBtn"><i class="fas fa-'
.concat(light ? 'moon' : 'sun').concat('"></i></div>')); .concat(light ? 'moon' : 'sun').concat('"></i></div>'));
// set the correct css file in the HTML head // set the correct css file in the HTML head
$('head').append('<link id="theme" rel="stylesheet" href="https://langue.phundrak.fr/css/' $('head').append('<link id="theme" rel="stylesheet" href="https://langue.phundrak.com/css/'
.concat(light ? 'light' : 'dark').concat('.css">')); .concat(light ? 'light' : 'dark').concat('.css">'));
// switch CSS files and button icon, set new cookie on theme switcher click // switch CSS files and button icon, set new cookie on theme switcher click
$('.themeBtn').click(function() { $('.themeBtn').click(function() {
var light = !isThemeLight(); var light = !isThemeLight();
// Switch the CSS between light and dark // Switch the CSS between light and dark
$("#theme").first().attr('href', 'https://langue.phundrak.fr/css/' $("#theme").first().attr('href', 'https://langue.phundrak.com/css/'
.concat(light ? 'light' : 'dark') .concat(light ? 'light' : 'dark')
.concat('.css')); .concat('.css'));
// Switch the icon in the theme switcher button // Switch the icon in the theme switcher button
$('.themeBtn').html('<i class="fas fa-' $('.themeBtn').html('<i class="fas fa-'
.concat(light ? 'moon' : 'sun') .concat(light ? 'moon' : 'sun')