Advertisement
ervinervinervin

popup.js

Oct 25th, 2016
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function save() {
  2.     chrome.tabs.create({"url": chrome.extension.getURL("popup/output.html")}, onCreated);
  3. }
  4.  
  5. function onCreated(newTab) {
  6.     chrome.tabs.executeScript(newTab.id, {
  7.         //file: "popup/output.js",
  8.         code: "alert('hello');",
  9.         //runAt: "document_start"
  10.         //allFrames: true
  11.     }, onExecuted);
  12. }
  13.  
  14. function onExecuted(result) {
  15.   alert("inside onExecuted");
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement