Created
February 8, 2010 14:14
-
-
Save xulapp/298165 to your computer and use it in GitHub Desktop.
bindTabOwner.uc.js (selectOwnerOnClose)
This file contains hidden or 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
// ==UserScript== | |
// @name bind tab owner | |
// @description select owner tab on close tab | |
// @include main | |
// @compatibility Firefox 3.5 3.6 | |
// @namespace http://twitter.com/xulapp | |
// @author xulapp | |
// @license MIT License | |
// @version 2010/02/28 04:50 +09:00 | |
// @note set browser.tabs.selectOwnerOnClose for true[default] | |
// ==/UserScript== | |
// @version 2010/02/21 07:20 +09:00 | |
// @version 2010/02/08 23:10 +09:00 | |
['addTab', 'updateCurrentBrowser'].forEach(function(name) { | |
eval('gBrowser[' + uneval(name) + '] = ' + gBrowser[name].toString().replace( | |
/\bthis\.mCurrentTab\.owner = null(?=;)/, | |
'' | |
)); | |
}); | |
eval('gBrowser._beginRemoveTab = ' + gBrowser._beginRemoveTab.toString().replace( | |
/(\btab\.owner = )(?=null;)/, | |
'$1aTab.owner || ' | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment