文件:
$(document).ready(function(){
var ext = localStorage["plugin"];
if(!ext || ext != true ){
$( .class ).css( display , inline );
}
});
背景:html
<script type="text/javascript">
localStorage["plugin"] = true ;
</script>
Im trying to create a plugin where the background page of the plugin sets a localstorage variable, and when the webpage is loaded, it checks if the localstorage variable is set. But now: When i run 背景:html (not loaded in the plugin yet) it should set the localstorage variable, and when i F5 the webpage it should keep the .class
hidden. But it doesn t. What s wrong?
Thew