Skip to content

Instantly share code, notes, and snippets.

// The following schema is auto-generated.
// This file contains FSL for FQL10-compatible schema items.
collection GeneralSetting {
history_days 30
}
collection Student {
history_days 30
index byEmailAndSub {
@dominwong4
dominwong4 / .js
Created February 20, 2021 21:18
Javascript overriding LocalStorage and SessionStorage for hiding data
//For React, just put this into anyway inside the react project
const _setItem = Storage.prototype.setItem;
const _getItem = Storage.prototype.getItem;
Storage.prototype.setItem = function(key, value) {
if (this === sessionStorage) { //example of specific Storage type
_setItem.call(this, key, btoa(encodeURIComponent(value)));//encodingURI is for language other than Latin
} else {
_setItem.call(this, arguments[0], arguments[1]);