Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- // var windowId;
- tabs = Array();
- testVal = 1;
- function setWindowId(win){
- windowId = win;
- id = win.id;
- alert(id+"id");
- chrome.tabs.getAllInWindow(id, function(tab){
- tabs = tab;
- testVal = 0;
- alert(testVal+"func");
- })
- //alert(window.id);
- }
- // get current window
- chrome.windows.getCurrent(setWindowId);
- // get all tabs in the window
- //chrome.tabs.getAllInWindow();
- // alert(tabs);
- alert(testVal);
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement