SHARE
TWEET

UserRandom

a guest Sep 21st, 2015 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function pasteRandom(info, tab) {
  2.         alert("item " + info.menuItemId + " was clicked");
  3.         alert("info: " + JSON.stringify(info));
  4.         alert("tab: " + JSON.stringify(tab));
  5. }
  6.        
  7. var root = chrome.contextMenus.create({
  8.         title: "Вставить данные из RandomUser" ,
  9.     id: "c_main",
  10.         contexts:["editable"]
  11. });
  12.  
  13. var child1 = chrome.contextMenus.create({
  14.         title: "Имя",
  15.         parentId: root,
  16.         id:"c_name",
  17.         contexts:["editable"]
  18. });
  19.  
  20. var child2 = chrome.contextMenus.create({
  21.         title: "Email",
  22.         parentId: root,
  23.         id:"c_mail",
  24.         contexts:["editable"]
  25. });
  26.  
  27. alert("parent:" + root + " child1:" + child1 + " child2:" + child2);
  28.  
  29. chrome.contextMenus.onClicked.addListener(pasteRandom);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top