Created
November 15, 2011 07:49
-
-
Save yangg/1366415 to your computer and use it in GitHub Desktop.
Open Frame in New Tab in Chrome
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<script> | |
function createMenu() { | |
chrome.contextMenus.create({ | |
title: "Open &Frame in New Tab", | |
onclick: function(info, tab) { | |
chrome.tabs.create({ | |
url: info.frameUrl || info.pageUrl, | |
index: tab.index + 1, | |
selected: true | |
}); | |
} | |
}); | |
} | |
createMenu(); | |
</script> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "framenewtab", | |
"description": "Open Frame in New Tab in Chrome", | |
"version": "1.0.0", | |
"permissions": ["contextMenus", "tabs"], | |
"background_page": "background.html" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment