mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Add option to open in tab for WebSearch plugin
This commit is contained in:
@@ -74,7 +74,14 @@ namespace Wox.Plugin.WebSearch
|
||||
IcoPath = searchSource.IconPath,
|
||||
Action = c =>
|
||||
{
|
||||
searchSource.Url.Replace("{q}", Uri.EscapeDataString(keyword)).NewBrowserWindow("");
|
||||
if (_settings.OpenInNewBrowser)
|
||||
{
|
||||
searchSource.Url.Replace("{q}", Uri.EscapeDataString(keyword)).NewBrowserWindow("");
|
||||
}
|
||||
else
|
||||
{
|
||||
searchSource.Url.Replace("{q}", Uri.EscapeDataString(keyword)).NewTabInBrowser("");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -132,7 +139,15 @@ namespace Wox.Plugin.WebSearch
|
||||
IcoPath = searchSource.IconPath,
|
||||
Action = c =>
|
||||
{
|
||||
searchSource.Url.Replace("{q}", Uri.EscapeDataString(o)).NewBrowserWindow("");
|
||||
if (_settings.OpenInNewBrowser)
|
||||
{
|
||||
searchSource.Url.Replace("{q}", Uri.EscapeDataString(o)).NewBrowserWindow("");
|
||||
}
|
||||
else
|
||||
{
|
||||
searchSource.Url.Replace("{q}", Uri.EscapeDataString(o)).NewTabInBrowser("");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -219,5 +219,7 @@ namespace Wox.Plugin.WebSearch
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpenInNewBrowser { get; set; } = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user