mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
vivaldi and opera support for incognito links
This commit is contained in:
parent
d14a4df9e3
commit
db4034d2d9
|
@ -15,18 +15,17 @@ namespace {
|
|||
// list of command line switches to turn on private browsing in browsers
|
||||
static auto switches = std::vector<std::pair<QString, QString>>{
|
||||
{"firefox", "-private-window"}, {"chrome", "-incognito"},
|
||||
{"vivaldi", "--private"}, {"opera", "-newprivatetab"},
|
||||
{"iexplore", "-private"},
|
||||
{"vivaldi", "-incognito"}, {"opera", "-newprivatetab"},
|
||||
{"opera\\\\launcher", "--private"}, {"iexplore", "-private"},
|
||||
};
|
||||
|
||||
// transform into regex and replacement string
|
||||
std::vector<std::pair<QRegularExpression, QString>> replacers;
|
||||
for (const auto &switch_ : switches) {
|
||||
replacers.emplace_back(
|
||||
QRegularExpression("(" + switch_.first + "\\.exe\"?).*"),
|
||||
QRegularExpression("(" + switch_.first + "\\.exe\"?).*",
|
||||
QRegularExpression::CaseInsensitiveOption),
|
||||
"\\1 " + switch_.second);
|
||||
|
||||
log("(" + switch_.first + "\\.exe\"?).*");
|
||||
}
|
||||
|
||||
// try to find matching regex and apply it
|
||||
|
|
Loading…
Reference in a new issue