mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 10:57:58 +01:00
Open the firstrun page in a new tab.
This commit is contained in:
@@ -2015,9 +2015,12 @@ const Dactyl = Module("dactyl", {
|
|||||||
// first time intro message
|
// first time intro message
|
||||||
const firstTime = "extensions." + config.name + ".firsttime";
|
const firstTime = "extensions." + config.name + ".firsttime";
|
||||||
if (prefs.get(firstTime, true)) {
|
if (prefs.get(firstTime, true)) {
|
||||||
util.timeout(function () {
|
dactyl.timeout(function () {
|
||||||
dactyl.help();
|
this.withSavedValues(["forceNewTab"], function () {
|
||||||
prefs.set(firstTime, false);
|
this.forceNewTab = true;
|
||||||
|
this.help();
|
||||||
|
prefs.set(firstTime, false);
|
||||||
|
});
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -573,14 +573,10 @@ const Tabs = Module("tabs", {
|
|||||||
commands.add(["tab"],
|
commands.add(["tab"],
|
||||||
"Execute a command and tell it to output in a new tab",
|
"Execute a command and tell it to output in a new tab",
|
||||||
function (args) {
|
function (args) {
|
||||||
try {
|
dactyl.withSavedValues(["forceNewTab"], function () {
|
||||||
var force = dactyl.forceNewTab;
|
this.forceNewTab = true;
|
||||||
dactyl.forceNewTab = true;
|
this.execute(args[0] || "", null, true);
|
||||||
dactyl.execute(args[0] || "", null, true);
|
});
|
||||||
}
|
|
||||||
finally {
|
|
||||||
dactyl.forceNewTab = force;
|
|
||||||
}
|
|
||||||
}, {
|
}, {
|
||||||
argCount: "+",
|
argCount: "+",
|
||||||
completer: function (context) completion.ex(context),
|
completer: function (context) completion.ex(context),
|
||||||
|
|||||||
@@ -48,8 +48,7 @@ Highlight.prototype.toString = function ()
|
|||||||
.join("\n\t");
|
.join("\n\t");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class to manage highlighting rules. The parameters are the
|
* A class to manage highlighting rules.
|
||||||
* standard parameters for any {@link Storage} object.
|
|
||||||
*
|
*
|
||||||
* @author Kris Maglione <maglione.k@gmail.com>
|
* @author Kris Maglione <maglione.k@gmail.com>
|
||||||
*/
|
*/
|
||||||
@@ -147,13 +146,12 @@ const Highlights = Module("Highlight", {
|
|||||||
*
|
*
|
||||||
* @param {string} class
|
* @param {string} class
|
||||||
*/
|
*/
|
||||||
selector: function (class_) {
|
selector: function (class_)
|
||||||
const self = this;
|
let (self = this)
|
||||||
return class_.replace(/(^|\s)([A-Z]\w+)\b/g,
|
class_.replace(/(^|\s)([A-Z]\w+)\b/g,
|
||||||
function (m, n1, hl) n1 +
|
function (m, n1, hl) n1 +
|
||||||
(self.highlight[hl] && self.highlight[hl].class != class_
|
(self.highlight[hl] && self.highlight[hl].class != class_
|
||||||
? self.highlight[hl].selector : "[dactyl|highlight~=" + hl + "]"));
|
? self.highlight[hl].selector : "[dactyl|highlight~=" + hl + "]")),
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears all highlighting rules. Rules with default values are
|
* Clears all highlighting rules. Rules with default values are
|
||||||
@@ -185,7 +183,7 @@ const Highlights = Module("Highlight", {
|
|||||||
* Bulk loads new CSS rules, in the format of,
|
* Bulk loads new CSS rules, in the format of,
|
||||||
*
|
*
|
||||||
* Rules ::= Rule | Rule "\n" Rule
|
* Rules ::= Rule | Rule "\n" Rule
|
||||||
* Rule ::= Bang? Star? MatchSpec Space Space* Css
|
* Rule ::= Bang? Star? MatchSpec Space Space+ Css
|
||||||
* | Comment
|
* | Comment
|
||||||
* Comment ::= Space* "//" *
|
* Comment ::= Space* "//" *
|
||||||
* Bang ::= "!"
|
* Bang ::= "!"
|
||||||
|
|||||||
@@ -65,8 +65,7 @@ Sheet.prototype.__defineGetter__("fullCSS", function wrapCSS() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages named and unnamed user style sheets, which apply to both
|
* Manages named and unnamed user style sheets, which apply to both
|
||||||
* chrome and content pages. The parameters are the standard
|
* chrome and content pages.
|
||||||
* parameters for any {@link Storage} object.
|
|
||||||
*
|
*
|
||||||
* @author Kris Maglione <maglione.k@gmail.com>
|
* @author Kris Maglione <maglione.k@gmail.com>
|
||||||
*/
|
*/
|
||||||
@@ -387,9 +386,9 @@ const Styles = Module("Styles", {
|
|||||||
names: ["-index", "-i"],
|
names: ["-index", "-i"],
|
||||||
type: modules.CommandOption.INT,
|
type: modules.CommandOption.INT,
|
||||||
completer: function (context) {
|
completer: function (context) {
|
||||||
context.compare = CompletionContext.Sort.number;
|
context.compare = modules.CompletionContext.Sort.number;
|
||||||
return [[i, <>{sheet.sites.join(",")}: {sheet.css.replace("\n", "\\n")}</>]
|
return [[i, <>{sheet.sites.join(",")}: {sheet.css.replace("\n", "\\n")}</>]
|
||||||
for ([i, sheet] in styles.userSheets)
|
for ([i, sheet] in styles.userSheets)
|
||||||
if (!cmd.filter || cmd.filter(sheet))];
|
if (!cmd.filter || cmd.filter(sheet))];
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
@@ -212,9 +212,10 @@ const Config = Module("config", ConfigBase, {
|
|||||||
commands.add(["wind[ow]"],
|
commands.add(["wind[ow]"],
|
||||||
"Execute a command and tell it to output in a new window",
|
"Execute a command and tell it to output in a new window",
|
||||||
function (args) {
|
function (args) {
|
||||||
dactyl.forceNewWindow = true;
|
dactyl.withSavedValues(["forceNewWindow"], function () {
|
||||||
dactyl.execute(args[0], null, true);
|
this.forceNewWindow = true;
|
||||||
dactyl.forceNewWindow = false;
|
this.execute(args[0], null, true);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
argCount: "+",
|
argCount: "+",
|
||||||
|
|||||||
Reference in New Issue
Block a user