background.js
// as this project gets larger there will be upgrades to storage items this will help
as this project gets larger there will be upgrades to storage items this will help
as this project gets larger there will be upgrades to storage items this will help
function DoUpgrades()
{
    var lastVersion = parseFloat(options.lastversion);
    if(localStorage["feeds"] != null && lastVersion < 2.0)
    {
        var feeds = JSON.parse(localStorage["feeds"]).sort(function (a, b){ return a.order - b.order; });
        for(var key in feeds)
        {
            if(feeds[key].id == null)
            {
                feeds[key].id = GetRandomID();
            }
        }
        localStorage["feeds"] = JSON.stringify(feeds);
    }
    if(lastVersion < 2.6)
    {
        alert("Sorry, I have to nuke your unread information for this upgrade.  Trust me, it's for the best.");
        delete localStorage["unreadinfo"];
        unreadInfo = GetUnreadCounts();
    }
    if(lastVersion == 2.97)
    {
        var result = confirm("Ok, last time I'll bug you.\n\nSlick RSS now has a Google Group for news and support.  Help shape Slick 3.0!  Do you want to check it out now?\n\nhttps://groups.google.com/d/forum/slick-rss");
        localStorage["alerted_group"] = 1; 
        if(result)
        {           
            chrome.tabs.create({url:"https://groups.google.com/d/forum/slick-rss"});
        }
    }
    options.lastversion = manifest.version;
    localStorage["options"] = JSON.stringify(options);
}
function DoUpgrades ( ) { var lastVersion = parseFloat ( options . lastversion ) ; if ( localStorage [ "feeds" ] != null && lastVersion < 2.0 ) { var feeds = JSON . parse ( localStorage [ "feeds" ] ) . sort ( function ( a , b ) { return a . order - b . order ; } ) ; for ( var key in feeds ) { if ( feeds [ key ] . id == null ) { feeds [ key ] . id = GetRandomID ( ) ; } } localStorage [ "feeds" ] = JSON . stringify ( feeds ) ; } if ( lastVersion < 2.6 ) { alert ( "Sorry, I have to nuke your unread information for this upgrade.  Trust me, it's for the best." ) ; delete localStorage [ "unreadinfo" ] ; unreadInfo = GetUnreadCounts ( ) ; } if ( lastVersion == 2.97 ) { var result = confirm ( "Ok, last time I'll bug you.\n\nSlick RSS now has a Google Group for news and support.  Help shape Slick 3.0!  Do you want to check it out now?\n\nhttps://groups.google.com/d/forum/slick-rss" ) ; localStorage [ "alerted_group" ] = 1 ; if ( result ) { chrome . tabs . create ( { url : "https://groups.google.com/d/forum/slick-rss" } ) ; } } options . lastversion = manifest . version ; localStorage [ "options" ] = JSON . stringify ( options ) ; }
as this project gets larger there will be upgrades to storage items this will help
as this project gets larger there will be upgrades to storage items this will help
// since 2.0 requires ids for feeds, lets make sure they have them // 2.6 makes unread key MD5(title + date) // update the last version to now