Created
April 10, 2015 06:21
-
-
Save gamblore/d3afeaec0bcdc631a450 to your computer and use it in GitHub Desktop.
Right tabs for chrome extension.
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
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