mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 15:48:00 +01:00
Add commandline.runSilently
This commit is contained in:
@@ -876,6 +876,20 @@ function CommandLine() //{{{
|
|||||||
storage.styles.removeSheet("silent-mode", null, null, null, true);
|
storage.styles.removeSheet("silent-mode", null, null, null, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
runSilently: function (fn, self)
|
||||||
|
{
|
||||||
|
let wasSilent = this.silent;
|
||||||
|
this.silent = true;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
fn.call(self);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
this.silent = wasSilent;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
get command()
|
get command()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in New Issue
Block a user