Created
April 24, 2013 11:03
-
-
Save teramako/5451367 to your computer and use it in GitHub Desktop.
現タブが about:blank や about:newtab だったら、:tabopen でも現タブに開くモンキーパッチ
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
commands.get("tabopen").action = function (args) { | |
let special = args.bang; | |
args = args.string; | |
if (options.get("activate").has("all", "tabopen")) | |
special = !special; | |
let where = special ? liberator.NEW_TAB : liberator.NEW_BACKGROUND_TAB; | |
if (buffer.URL === "about:blank" || | |
buffer.URL === "about:newtab") | |
where = liberator.CURRENT_TAB; | |
if (args) | |
liberator.open(args, { where: where }); | |
else | |
liberator.open("", { where: where }); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment