Skip to content

Instantly share code, notes, and snippets.

View MDSLKTR's full-sized avatar
💅
Du weißt

Simon Kunz MDSLKTR

💅
Du weißt
View GitHub Profile
version: "2" # required to adjust maintainability checks
checks:
argument-count:
enabled: true
config:
threshold: 4
complex-logic:
enabled: true
config:
threshold: 4
@MDSLKTR
MDSLKTR / display-localstorage-size.txt
Last active April 21, 2016 19:56
Add this to the location field of a new browser bookmark to display the size of the localstorage of your current page.
javascript: var x,log=[],total=0;for (x in localStorage){log.push(x + " = " + ((localStorage[x].length * 2)/1024/1024).toFixed(2) + " MB"); total+=localStorage[x].length * 2}; log.push("Total = " + (total/1024/1024).toFixed(2)+ " MB"); alert(log.join("\n"));