Hola y muchas gracias por toda la comunidad SO
Vengo hoy porque trato de crear almacenamiento local con Javascript para que mis usuarios puedan cambiar el fondo y la configuración de la página en mi sitio web y encontrarlo cuando se recarga la página. Intenté muchos intentos, pero soy muy principiante para hacer que funcione.
var m = new saStore({ modules: { programs: p, preferences: { state: { background: "images/backgrounds/background2.jpg", preferredColor: "#1e90ff", isWiFiConnected: !1 }, getters: { background: function(t) { return t.background }, preferredColor: function(t) { return t.preferredColor }, isWiFiConnected: function(t) { return t.isWiFiConnected } }, actions: {}, mutations: { changePreferredColor: function(t, e) { t.preferredColor = e }, changeBackground: function(t, e) { t.background = e }, toggleWiFiConnection: function(t) { t.isWiFiConnected = !t.isWiFiConnected } } }, filesystem: d }, strict: !1 }); iaprototype.$t = function(t) { return t }, iaconfig.devtools = !0, new ia({ el: "#app", store: m, components: { App: aa } }) }, function(t, e, n) { "use strict"; (function(e, n) { var r = Object.freeze({}); function i(t) { return null == t } function o(t) { return null != t } function a(t) { return !0 === t } function s(t) { return "string" == typeof t || "number" == typeof t || "symbol" == typeof t || "boolean" == typeof t } function u(t) { return null !== t && "object" == typeof t } there is the code i tried to add just before without sucess (blank page) : var m = { ...localStorage }; localStorage.getItem("background"); localStorage.setItem("background");Gracias por su apoyo
Saludos