Skip to content

Instantly share code, notes, and snippets.

@eagletmt
Created October 12, 2012 06:02
Show Gist options
  • Save eagletmt/3877563 to your computer and use it in GitHub Desktop.
Save eagletmt/3877563 to your computer and use it in GitHub Desktop.
:tabopen したときに、about:newtab があったらそこに開く
(function() {
let U = liberator.plugins.libly.$U;
let tabopen = commands.get('tabopen');
let open = commands.get('open');
U.around(tabopen, 'action', function(next, args) {
for each ([idx, tab] in tabs.browsers) {
if (tab.currentURI.spec == 'about:newtab') {
tabs.select(idx);
return open.action.apply(open, args);
}
}
return next();
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment