mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
WebPage: Don't force enable JavaScript on file: scheme
This commit is contained in:
parent
4bf85ee3cb
commit
7dfce692d7
|
@ -382,7 +382,7 @@ bool WebPage::acceptNavigationRequest(const QUrl &url, QWebEnginePage::Navigatio
|
|||
const bool result = QWebEnginePage::acceptNavigationRequest(url, type, isMainFrame);
|
||||
|
||||
if (result && isMainFrame) {
|
||||
const bool isWeb = url.scheme() == QL1S("http") || url.scheme() == QL1S("https");
|
||||
const bool isWeb = url.scheme() == QL1S("http") || url.scheme() == QL1S("https") || url.scheme() == QL1S("file");
|
||||
const bool globalJsEnabled = mApp->webSettings()->testAttribute(QWebEngineSettings::JavascriptEnabled);
|
||||
settings()->setAttribute(QWebEngineSettings::JavascriptEnabled, isWeb ? globalJsEnabled : true);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user