♻️ <style> elements for saving background data
This commit is contained in:
parent
3315b636a3
commit
6e4b28e6b6
|
@ -706,7 +706,9 @@ lichess.storage = {
|
|||
// themepicker
|
||||
$('#themepicker_toggle').one('mouseover', function() {
|
||||
var applyBackground = function(v) {
|
||||
$('head').append('<style>body.transp::before{background-image:url(' + v + ');}</style>');
|
||||
var bgData = document.getElementById('bg-data');
|
||||
bgData ? bgData.innerHTML = 'body.transp::before{background-image:url(' + v + ');}' :
|
||||
$('head').append('<style id="bg-data">body.transp::before{background-image:url(' + v + ');}</style>');
|
||||
};
|
||||
var $themepicker = $('#themepicker');
|
||||
$.ajax({
|
||||
|
|
Loading…
Reference in a new issue