/*
 * LocalStore key => "gh_search_text"
 *
 * FORMAT
 *      "gh_search_text" : {
 *          "settings" : {
 *              "background_match" : "COLOR"
 *          },
 *          "text_search" : {
 *              "value" :  "SEARCH_STRING",
 *              "matches" : [ "FILENAME", "FILENAME" ]
 *          }
 *      }
 *
 * */


function init()
{

    // check if background color is stored
    if (localStorage.getItem("gh_text_search") === null)
    {
        var data = {};
        // init background color if it not exists
        data["settings"] = {"background_match": "#fff0b3"};
        data["text_search"] = {};
        // TODO add history
        localStorage.setItem("gh_text_search" , JSON.stringify(data))

    } else {
        console.log("EXT already initialized");
        console.log(localStorage.getItem("gh_text_search")) ;
    }
    console.log("INIT EXT");

}

init();

@@ -397,16 +397,23 @@
     if (
+window.
 localSto
@@ -662,16 +662,23 @@
         
+window.
 localSto
@@ -865,38 +865,8 @@
   %7D%0A
-    console.log(%22INIT EXT%22);%0A%0A
 %7D%0A%0Ai

add window to localStorage