I'm looking to send data from a website to the LocalStorage of a chrome extension.

I've tried the below answer which is what I'm looking for, however it appears to not be functioning at all on Chrome 29 stable. Could anyone advise as to why this may be/tweaks?