mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-10-17 01:02:31 +02:00
Add commandline.runSilently
This commit is contained in:
1 parent
3f24bd5d6d
commit
6ca4af3c95
1 file changed
+14
@@ -876,6 +876,20 @@ function CommandLine() //{{{
|
||||
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()
|
||||
{
|
||||
try
|
||||
|
||||
Reference in new issue
Block a user