Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private _init() {
localForage.config({
driver: [localForage.INDEXEDDB, localForage.WEBSQL, localForage.LOCALSTORAGE],
name: 'SUP',
// version: 1.0,
storeName: 'SUP_STORE', // Should be alphanumeric, with underscores.
description: 'All data for Super Productivity 2'
});
}
}
init() {
localforage.config({
// driver: localforage.INDEXEDDB, // Force WebSQL; same as using setDriver()
name: 'react_orchestra',
version: 1.0,
size: 4980736, // Size of database, in bytes. WebSQL-only for now.
storeName: 'react_orchestra', // Should be alphanumeric, with underscores.
description: 'React Orchestra storage to cache mp3 notes and store app state',
});
this.db = localforage.createInstance({
name: 'react_orchestra',
});
},
async set(key, value) {
import "medium-editor/dist/css/themes/default.css";
// Needed for enabling medium-editor-insert-plugin jquery plugin
import "./lib/medium-editor-insert-plugin.min.css";
window.$ = window.jQuery = require("jquery");
require("../node_modules/medium-editor/dist/js/medium-editor.js");
require("../node_modules/handlebars/dist/handlebars.runtime.min.js");
require("../node_modules/blueimp-file-upload/js/vendor/jquery.ui.widget.js");
require("../node_modules/blueimp-file-upload/js/jquery.iframe-transport.js");
require("../node_modules/blueimp-file-upload/js/jquery.fileupload.js");
require("./lib/jquery-sortable-min.js");
require("./lib/linkify.min.js");
require("./lib/linkify-jquery.min.js");
window.MediumInsert = require("./lib/medium-editor-insert-plugin.min.js").MediumInsert;
localforage.config({
name: "ElasticBlogEngine",
storeName: "app_store",
});
render(, document.getElementById("root"));
import errorHandler from '@/utils/vue-error-handler'
import pkg from '#/package.json'
import './registerComponents'
import './registerServiceWorker'
const isProduction = process.env.NODE_ENV === 'production'
/**
* This is required as Webpack seems to do some static analysis
* and breaking the module.
* @see https://github.com/localForage/localForage-startsWith/issues/5
*/
extendPrototype(localforage)
localforage.config({
name: 'happy-plants',
driver: [localforage.INDEXEDDB, localforage.LOCALSTORAGE]
})
// Temporary fix to clean up DB.
localforage.keys()
.then(keys => {
if (keys.includes('undefined')) {
localforage.removeItem('undefined')
}
})
/**
* Vue configuration.
*/
Vue.config.productionTip = isProduction
// Create store
export const store = createStore(
combineReducers({
booted,
dashboard,
settings,
storage,
version,
ui,
}),
autoRehydrate(),
);
// Setup localForage
localForage.config({
name: 'tabliss',
storeName: 'state',
});
// Begin periodically persisting the store
export const persistor = persistStore(store, {
debounce: 100,
keyPrefix: '',
serialize: false,
storage: localForage,
transforms: [
createBlacklistFilter('booted'),
createBlacklistFilter('ui', ['pending', 'settings']),
],
});
constructor() {
/* TODO remove when it is working again
* With the latest version of localforage Firefox can not use indexDB
* "A mutation operation was attempted on a database that did not allow mutations."
* Therefor we have to use localstorage until it is fixed
*/
if (ClientDetector.getClient().name === ClientNames.Firefox) {
localforage.config({
driver: localforage.LOCALSTORAGE
});
}
}
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import configureStore from 'shared/store/configureStore';
import './app.global.scss';
import Config from '../../config/index';
import localForage from 'localforage';
import cssVariables from '!!sass-variable-loader!renderer/variables.scss';
import darkBaseTheme from 'material-ui/styles/baseThemes/darkBaseTheme';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import App from './containers/App';
// localForage configuration
localForage.config(Config.localForageConfig);
darkBaseTheme.fontFamily = cssVariables.fontFamily;
darkBaseTheme.palette.textColor = cssVariables.fontColor;
darkBaseTheme.palette.accent1Color = cssVariables.materialUiAccentColor;
darkBaseTheme.palette.accent2Color = cssVariables.materialUiAccentColor;
darkBaseTheme.palette.accent3Color = cssVariables.materialUiAccentColor;
const store = configureStore();
render(
,
document.getElementById('root')
constructor(name) {
// TODO : check for localforage.supports(localforage.INDEXEDDB)
localforage.config({
driver: localforage.INDEXEDDB,
name,
})
}
init()
{
localforage.config({
driver: localforage.INDEXEDDB,
name: 'ShaderBoy',
version: 1.0,
storeName: 'shaderdata'
})
ShaderBoy.renderScale = 2
ShaderBoy.editor.textSize = 16
this.initLoading = true
this.isNewShader = false
this.isAppInit = false
this.idList = {}
this.ID_DIR_APP = ''
this.ID_DIR_SHADER = ''