Skip to content

Instantly share code, notes, and snippets.

Verawat kverawat

Block or report user

Report or block kverawat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kverawat / A.markdown
Created Oct 26, 2016 — forked from umpirsky/A.markdown
Sublime Text Monokai Sidebar Theme.
View A.markdown
kverawat / localStorage.js
Created Jun 10, 2016 — forked from anhang/localStorage.js
HTML5 Local Storage with Expiration
View localStorage.js = {
save : function(key, jsonData, expirationMin){
if (!Modernizr.localstorage){return false;}
var expirationMS = expirationMin * 60 * 1000;
var record = {value: JSON.stringify(jsonData), timestamp: new Date().getTime() + expirationMS}
localStorage.setItem(key, JSON.stringify(record));
return jsonData;
load : function(key){
if (!Modernizr.localstorage){return false;}
View gist:5065fe11a9141112bbe3c3e85b085296
You can’t perform that action at this time.