javascript - chrome extension right context menus -


below code google chrome extension. beginner it. trying append result div of pop html. nothing appended. , if click context menu multiple times, right context menu created multiple times. when open extension pop console, pop appear, otherwise, won's. confused. can me out?

 chrome.contextmenus.create({       "title": "my extension",       "contexts": [ "page" ,"selection"], }) function parser(article, key, threadshold){         console.log(article);         var ret = "<div>" + key + ": ";         var res = json.parse(article)["results"];         var keywords = res[key]["results"][0];         console.log(keywords);         var sortable = [];         (var keyword in keywords){           sortable.push([keyword, keywords[keyword]])        }         sortable.sort(function(a,b) {return b[1] - a[1]})         (var item in sortable){             console.log(sortable[item][1]);            $("#keywords").append("<tr> <td>" + sortable[item][0]);            window.show("popup.html");         }        } 


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -