Allow manual editing of browser extension connection keys

This commit is contained in:
varjolintu 2020-04-12 18:51:46 +03:00 committed by Jonathan White
parent d5de042529
commit 287e822e02
9 changed files with 122 additions and 1 deletions

View file

@ -276,6 +276,12 @@ QJsonObject NativeMessageInstaller::constructFile(SupportedBrowsers browser)
for (const QString& origin : ALLOWED_ORIGINS) {
arr.append(origin);
}
#ifdef QT_DEBUG
auto customId = browserSettings()->customExtensionId();
if (!customId.isEmpty()) {
arr.append(QString("chrome-extension://%1/").arg(customId));
}
#endif
script["allowed_origins"] = arr;
}