mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
[QupZillaPages] Always enable JavaScript for qupzilla: pages
Closes #1150
This commit is contained in:
parent
354b9d1695
commit
36724df3a6
@ -204,7 +204,10 @@ bool WebPage::isLoading() const
|
|||||||
|
|
||||||
void WebPage::urlChanged(const QUrl &url)
|
void WebPage::urlChanged(const QUrl &url)
|
||||||
{
|
{
|
||||||
Q_UNUSED(url)
|
// Make sure JavaScript is enabled for qupzilla pages regardless of user settings
|
||||||
|
if (url.scheme() == QLatin1String("qupzilla")) {
|
||||||
|
settings()->setAttribute(QWebSettings::JavascriptEnabled, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (isLoading()) {
|
if (isLoading()) {
|
||||||
m_adBlockedEntries.clear();
|
m_adBlockedEntries.clear();
|
||||||
@ -280,6 +283,12 @@ void WebPage::printFrame(QWebFrame* frame)
|
|||||||
|
|
||||||
void WebPage::addJavaScriptObject()
|
void WebPage::addJavaScriptObject()
|
||||||
{
|
{
|
||||||
|
// Make sure all other sites have JavaScript set by user preferences
|
||||||
|
// (JavaScript is enabled in WebPage::urlChanged)
|
||||||
|
if (url().scheme() != QLatin1String("qupzilla")) {
|
||||||
|
settings()->setAttribute(QWebSettings::JavascriptEnabled, mApp->webSettings()->testAttribute(QWebSettings::JavascriptEnabled));
|
||||||
|
}
|
||||||
|
|
||||||
if (url().toString() != QLatin1String("qupzilla:speeddial")) {
|
if (url().toString() != QLatin1String("qupzilla:speeddial")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user