Skip to content

Instantly share code, notes, and snippets.

@gamblore
Created April 10, 2015 06:21
Show Gist options
  • Save gamblore/d3afeaec0bcdc631a450 to your computer and use it in GitHub Desktop.
Save gamblore/d3afeaec0bcdc631a450 to your computer and use it in GitHub Desktop.
Right tabs for chrome extension.
manifest.json----
{
"background": {
"persistent": false,
"page": "right-tabs.html"
},
"description": "Create tabs on the right.",
"name": "RightTabs",
"permissions": [
"tabs"
],
"manifest_version": 2,
"version": "1"
}
right-tabs.html----
<script type='text/javascript' src='right-tabs.js'></script>
right-tabs.js----
chrome.tabs.onCreated.addListener(function(tab) {
chrome.windows.get(tab.windowId, function(w) {
chrome.tabs.move(tab.id, {"windowId": w.id, "index": -1});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment