Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Nov 2010
    Posts
    33
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Cool Is this how to store local storage? Can GC & FF extensions change elements on page?

    is "localStorage" a native variable to javascript?
    On lin 36 & 37 is there anything else involved in getting that local storage to store? Those lines are local storage right?
    Is it really that easy?
    I was just reading this HUGE post and immediately stressed me out. I'm used to working off small examples and diving in bit by bit. It was the first article on google so I trusted it to be the most appropriate for introductions. (which means not reading more than 500 words before I get some sample code)



    In addition, can Google Chrome & FireFox extensions change page elements? The reason I think it can do this is because google chrome says this
    Which (to me) implies that the extension has access to page data.
    If that is the case. How are localStorage variables not mixing? How can I access that page data? I don't care about browser history, I just want to change page elements. Is this possible?


    If this is the case. Is there a way I can have the extension close itself or not open at all? Sometimes I just want the "extension" to provide a simple function. That's all. Thanks!


    I had Silverbird and the tutorialzine example extension. They were both different size. Odd thing is that I never saw a size specification in the style.css in the tutorialzine example. How can I specify the size of the popup extension?
    Last edited by Keysle; 05-21-2012 at 10:47 PM.

  • #2
    Senior Coder Logic Ali's Avatar
    Join Date
    Sep 2010
    Location
    London
    Posts
    1,028
    Thanks
    0
    Thanked 207 Times in 202 Posts
    Quote Originally Posted by Keysle View Post
    is "localStorage" a native variable to javascript?
    On lin 36 & 37 is there anything else involved in getting that local storage to store? Those lines are local storage right?
    Is it really that easy?
    Yes. localStorage is a native object to which properties can be assigned directly, but they are always stored as strings regardless of their type when assigned. You can also use setItem/getItem methods.

    The test on line 10 is flawed because it fails to check for localStorage support.

  • Users who have thanked Logic Ali for this post:

    Keysle (05-24-2012)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •