Adding a localstorage key into a jquery script

Adding a localstorage key into a jquery script

Hi,

I'm trying to adapt some jquery code but having trouble making sense of a lot of it.. I thought it would be pretty easy to insert a variable stored in localstorage into the script..

I thought it would be simple to just add localStorage.getItem("RSSfeeds"); into the script but no joy. The RSSfeeds key is basically a string of more code like newsfeed.addFeed("Ormiston School News", "http://www.ormistonsandwell.org.uk/RSS/News/"); How can I add them into the code below?
  1. var newsfeed=new gfeedfetcher("rssfeeds", "rssfeedsclass", "_new")
  2. newsfeed.addFeed("Ormiston School News", "http://www.ormistonsandwell.org.uk/RSS/News/");
  3. localStorage.getItem("RSSfeeds");
  4. newsfeed.displayoptions("label datetime snippet");
  5. newsfeed.setentrycontainer("p");
  6. newsfeed.filterfeed(20, "date");
  7. newsfeed.init();




    • Topic Participants

    • dr