From ea604d5bca7f643eac7eace67463b3bc6a57d498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mladen=20Pejakovi=C4=87?= Date: Fri, 28 Dec 2012 01:17:01 +0100 Subject: [PATCH 1/5] JavaScript privacy options --- src/lib/app/mainapplication.cpp | 4 +- src/lib/lib.pro | 3 + src/lib/preferences/jsoptions.cpp | 57 ++++++++++++ src/lib/preferences/jsoptions.h | 46 ++++++++++ src/lib/preferences/jsoptions.ui | 115 ++++++++++++++++++++++++ src/lib/preferences/preferences.cpp | 16 ++-- src/lib/preferences/preferences.h | 1 + src/lib/preferences/preferences.ui | 134 +++++++++++++--------------- 8 files changed, 297 insertions(+), 79 deletions(-) create mode 100644 src/lib/preferences/jsoptions.cpp create mode 100644 src/lib/preferences/jsoptions.h create mode 100644 src/lib/preferences/jsoptions.ui diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index 183166321..15a3bfb2d 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -367,7 +367,7 @@ void MainApplication::loadSettings() m_websettings->setAttribute(QWebSettings::JavascriptCanOpenWindows, settings.value("allowJavaScriptOpenWindow", false).toBool()); m_websettings->setAttribute(QWebSettings::JavaEnabled, settings.value("allowJava", true).toBool()); m_websettings->setAttribute(QWebSettings::DnsPrefetchEnabled, settings.value("DNS-Prefetch", false).toBool()); - m_websettings->setAttribute(QWebSettings::JavascriptCanAccessClipboard, settings.value("JavaScriptCanAccessClipboard", true).toBool()); + m_websettings->setAttribute(QWebSettings::JavascriptCanAccessClipboard, settings.value("allowJavaScriptAccessClipboard", true).toBool()); m_websettings->setAttribute(QWebSettings::LinksIncludedInFocusChain, settings.value("IncludeLinkInFocusChain", false).toBool()); m_websettings->setAttribute(QWebSettings::ZoomTextOnly, settings.value("zoomTextOnly", false).toBool()); m_websettings->setAttribute(QWebSettings::PrintElementBackgrounds, settings.value("PrintElementBackground", true).toBool()); @@ -387,7 +387,7 @@ void MainApplication::loadSettings() #if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0)) m_websettings->setAttribute(QWebSettings::HyperlinkAuditingEnabled, true); - m_websettings->setAttribute(QWebSettings::JavascriptCanCloseWindows, true); + m_websettings->setAttribute(QWebSettings::JavascriptCanCloseWindows, settings.value("allowJavaScriptCloseWindow", false).toBool()); #endif setWheelScrollLines(settings.value("wheelScrollLines", wheelScrollLines()).toInt()); diff --git a/src/lib/lib.pro b/src/lib/lib.pro index 8586d6605..dc8aa00c1 100644 --- a/src/lib/lib.pro +++ b/src/lib/lib.pro @@ -92,6 +92,7 @@ SOURCES += \ autofill/autofillnotification.cpp \ rss/rssnotification.cpp \ preferences/sslmanager.cpp \ + preferences/jsoptions.cpp \ tools/animatedwidget.cpp \ tools/htmlhighlighter.cpp \ tools/colors.cpp \ @@ -247,6 +248,7 @@ HEADERS += \ autofill/autofillnotification.h \ rss/rssnotification.h \ preferences/sslmanager.h \ + preferences/jsoptions.h \ tools/animatedwidget.h \ tools/htmlhighlighter.h \ other/sourceviewersearch.h \ @@ -372,6 +374,7 @@ FORMS += \ autofill/autofillnotification.ui \ rss/rssnotification.ui \ preferences/sslmanager.ui \ + preferences/jsoptions.ui \ other/clearprivatedata.ui \ other/sourceviewersearch.ui \ adblock/adblockdialog.ui \ diff --git a/src/lib/preferences/jsoptions.cpp b/src/lib/preferences/jsoptions.cpp new file mode 100644 index 000000000..99a5d67da --- /dev/null +++ b/src/lib/preferences/jsoptions.cpp @@ -0,0 +1,57 @@ +/* ============================================================ +* QupZilla - WebKit based browser +* Copyright (C) 2010-2012 David Rosca +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#include "jsoptions.h" +#include "ui_jsoptions.h" +#include "mainapplication.h" +#include "settings.h" + +#include + +JsOptions::JsOptions(QWidget* parent) + : QDialog(parent) + , ui(new Ui::JsOptions) +{ + setAttribute(Qt::WA_DeleteOnClose); + ui->setupUi(this); + + Settings settings; + settings.beginGroup("Web-Browser-Settings"); + ui->jscanCloseWindow->setChecked(settings.value("allowJavaScriptCloseWindow", false).toBool()); + ui->jscanOpenWindow->setChecked(settings.value("allowJavaScriptOpenWindow", false).toBool()); + ui->jscanAccessClipboard->setChecked(settings.value("allowJavaScriptAccessClipboard", false).toBool()); + settings.endGroup(); + + connect(ui->jsoptsbbox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(buttonClicked(QAbstractButton*))); +} + +void JsOptions::accept() +{ + Settings settings; + settings.beginGroup("Web-Browser-Settings"); + settings.setValue("allowJavaScriptCloseWindow", ui->jscanCloseWindow->isChecked()); + settings.setValue("allowJavaScriptOpenWindow", ui->jscanOpenWindow->isChecked()); + settings.setValue("allowJavaScriptAccessClipboard", ui->jscanAccessClipboard->isChecked()); + settings.endGroup(); + + QDialog::close(); +} + +JsOptions::~JsOptions() +{ + delete ui; +} diff --git a/src/lib/preferences/jsoptions.h b/src/lib/preferences/jsoptions.h new file mode 100644 index 000000000..9259bcacb --- /dev/null +++ b/src/lib/preferences/jsoptions.h @@ -0,0 +1,46 @@ +/* ============================================================ +* QupZilla - WebKit based browser +* Copyright (C) 2010-2012 David Rosca +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#ifndef JSOPTIONS_H +#define JSOPTIONS_H + +#include + +#include "qz_namespace.h" + +namespace Ui +{ +class JsOptions; +} + +class QT_QUPZILLA_EXPORT JsOptions : public QDialog +{ + Q_OBJECT + +public slots: + void accept(); + +public: + explicit JsOptions(QWidget* parent = 0); + ~JsOptions(); + +private: + + Ui::JsOptions* ui; +}; + +#endif // JSOPTIONS_H diff --git a/src/lib/preferences/jsoptions.ui b/src/lib/preferences/jsoptions.ui new file mode 100644 index 000000000..aee5da990 --- /dev/null +++ b/src/lib/preferences/jsoptions.ui @@ -0,0 +1,115 @@ + + + JsOptions + + + + 0 + 0 + 302 + 126 + + + + JavaScript Options + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Allow JavaScript to close windows + + + + + + + If enabled, pages will be allowed to automatically open popup windows + + + Allow JavaScript to open popup windows + + + + + + + Allow JavaScript to access clipboard + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + jsoptsbbox + accepted() + JsOptions + accept() + + + 248 + 254 + + + 157 + 274 + + + + + jsoptsbbox + rejected() + JsOptions + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/src/lib/preferences/preferences.cpp b/src/lib/preferences/preferences.cpp index 9a7b1637f..a851dd7db 100644 --- a/src/lib/preferences/preferences.cpp +++ b/src/lib/preferences/preferences.cpp @@ -30,6 +30,7 @@ #include "pluginsmanager.h" #include "qtwin.h" #include "sslmanager.h" +#include "jsoptions.h" #include "networkproxyfactory.h" #include "networkmanager.h" #include "desktopnotificationsfactory.h" @@ -252,7 +253,7 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent) ui->xssAuditing->setChecked(settings.value("XSSAuditing", false).toBool()); if (!ui->allowJavaScript->isChecked()) { - ui->blockPopup->setEnabled(false); + ui->jsOptionsButton->setEnabled(false); } connect(ui->allowJavaScript, SIGNAL(toggled(bool)), this, SLOT(allowJavaScriptChanged(bool))); //Cache @@ -289,8 +290,6 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent) ui->deleteHtml5storageOnClose->setChecked(settings.value("deleteHTML5StorageOnClose", false).toBool()); connect(ui->html5storage, SIGNAL(toggled(bool)), this, SLOT(allowHtml5storageChanged(bool))); // Other - ui->blockPopup->setChecked(!settings.value("allowJavaScriptOpenWindow", false).toBool()); - ui->jscanAccessClipboard->setChecked(settings.value("JavaScriptCanAccessClipboard", true).toBool()); ui->doNotTrack->setChecked(settings.value("DoNotTrack", false).toBool()); ui->sendReferer->setChecked(settings.value("SendReferer", true).toBool()); @@ -458,6 +457,7 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent) connect(ui->preferredLanguages, SIGNAL(clicked()), this, SLOT(showAcceptLanguage())); connect(ui->deleteHtml5storage, SIGNAL(clicked()), this, SLOT(deleteHtml5storage())); connect(ui->uaManager, SIGNAL(clicked()), this, SLOT(openUserAgentManager())); + connect(ui->jsOptionsButton, SIGNAL(clicked()), this, SLOT(openJsOptions())); connect(ui->listWidget, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT(showStackedPage(QListWidgetItem*))); ui->listWidget->setItemSelected(ui->listWidget->itemAt(5, 5), true); @@ -604,7 +604,7 @@ void Preferences::setManualProxyConfigurationEnabled(bool state) void Preferences::allowJavaScriptChanged(bool state) { - ui->blockPopup->setEnabled(state); + ui->jsOptionsButton->setEnabled(state); } void Preferences::saveHistoryChanged(bool stat) @@ -637,6 +637,12 @@ void Preferences::openSslManager() m->show(); } +void Preferences::openJsOptions() +{ + JsOptions* m = new JsOptions(this); + m->show(); +} + void Preferences::showAcceptLanguage() { AcceptLanguage a(this); @@ -886,10 +892,8 @@ void Preferences::saveSettings() settings.beginGroup("Web-Browser-Settings"); settings.setValue("allowFlash", ui->allowPlugins->isChecked()); settings.setValue("allowJavaScript", ui->allowJavaScript->isChecked()); - settings.setValue("allowJavaScriptOpenWindow", !ui->blockPopup->isChecked()); settings.setValue("allowJava", ui->allowJava->isChecked()); settings.setValue("DNS-Prefetch", ui->allowDNSPrefetch->isChecked()); - settings.setValue("JavaScriptCanAccessClipboard", ui->jscanAccessClipboard->isChecked()); settings.setValue("IncludeLinkInFocusChain", ui->linksInFocusChain->isChecked()); settings.setValue("zoomTextOnly", ui->zoomTextOnly->isChecked()); settings.setValue("CaretBrowsing", ui->caretBrowsing->isChecked()); diff --git a/src/lib/preferences/preferences.h b/src/lib/preferences/preferences.h index 914d9d4cc..72fa68cb6 100644 --- a/src/lib/preferences/preferences.h +++ b/src/lib/preferences/preferences.h @@ -61,6 +61,7 @@ private slots: void deleteHtml5storage(); void chooseExternalDownloadManager(); void openUserAgentManager(); + void openJsOptions(); void allowJavaScriptChanged(bool state); void saveHistoryChanged(bool state); diff --git a/src/lib/preferences/preferences.ui b/src/lib/preferences/preferences.ui index 5483b3dac..0cb6756cd 100644 --- a/src/lib/preferences/preferences.ui +++ b/src/lib/preferences/preferences.ui @@ -167,16 +167,7 @@ - - 0 - - - 0 - - - 0 - - + 0 @@ -507,16 +498,7 @@ Themes - - 0 - - - 0 - - - 0 - - + 0 @@ -2047,21 +2029,30 @@ - - + + - JavaScript can access clipboard + Allow storing of cookies - - - - Block popup windows + + + + Qt::Horizontal - + + QSizePolicy::Fixed + + + + 40 + 20 + + + - + Send Referer header to servers @@ -2082,13 +2073,6 @@ - - - - Allow storing of cookies - - - @@ -2112,14 +2096,14 @@ - + Send Do Not Track header to servers - + <b>Other</b> @@ -2188,29 +2172,6 @@ - - - - Delete cookies on close - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 40 - 20 - - - - @@ -2228,6 +2189,46 @@ + + + + Delete cookies on close + + + + + + + true + + + <b>JavaScript</b> + + + + + + + false + + + Manage JavaScript privacy options + + + + + + + + 0 + 0 + + + + JavaScript options + + + @@ -2368,16 +2369,7 @@ - - 0 - - - 0 - - - 0 - - + 0 From d8e6f5f483efa93cc3de43bb426353ce06ae1379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mladen=20Pejakovi=C4=87?= Date: Fri, 28 Dec 2012 01:58:31 +0100 Subject: [PATCH 2/5] JavaScript privacy options, update, part1 --- src/lib/preferences/jsoptions.cpp | 8 ++++++++ src/lib/preferences/jsoptions.ui | 30 +++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/lib/preferences/jsoptions.cpp b/src/lib/preferences/jsoptions.cpp index 99a5d67da..baf109580 100644 --- a/src/lib/preferences/jsoptions.cpp +++ b/src/lib/preferences/jsoptions.cpp @@ -33,6 +33,10 @@ JsOptions::JsOptions(QWidget* parent) settings.beginGroup("Web-Browser-Settings"); ui->jscanCloseWindow->setChecked(settings.value("allowJavaScriptCloseWindow", false).toBool()); ui->jscanOpenWindow->setChecked(settings.value("allowJavaScriptOpenWindow", false).toBool()); + ui->jscanChangeSize->setChecked(settings.value("allowJavaScriptGeometryChange", false).toBool()); + ui->jscanHideMenu->setChecked(settings.value("allowJavaScriptHideMenuBar", false).toBool()); + ui->jscanHideStatus->setChecked(settings.value("allowJavaScriptHideStatusBar", false).toBool()); + ui->jscanHideTool->setChecked(settings.value("allowJavaScriptHideToolBar", false).toBool()); ui->jscanAccessClipboard->setChecked(settings.value("allowJavaScriptAccessClipboard", false).toBool()); settings.endGroup(); @@ -45,6 +49,10 @@ void JsOptions::accept() settings.beginGroup("Web-Browser-Settings"); settings.setValue("allowJavaScriptCloseWindow", ui->jscanCloseWindow->isChecked()); settings.setValue("allowJavaScriptOpenWindow", ui->jscanOpenWindow->isChecked()); + settings.setValue("allowJavaScriptGeometryChange", ui->jscanChangeSize->isChecked()); + settings.setValue("allowJavaScriptHideMenuBar", ui->jscanHideMenu->isChecked()); + settings.setValue("allowJavaScriptHideStatusBar", ui->jscanHideStatus->isChecked()); + settings.setValue("allowJavaScriptHideToolBar", ui->jscanHideTool->isChecked()); settings.setValue("allowJavaScriptAccessClipboard", ui->jscanAccessClipboard->isChecked()); settings.endGroup(); diff --git a/src/lib/preferences/jsoptions.ui b/src/lib/preferences/jsoptions.ui index aee5da990..d73859db8 100644 --- a/src/lib/preferences/jsoptions.ui +++ b/src/lib/preferences/jsoptions.ui @@ -7,7 +7,7 @@ 0 0 302 - 126 + 226 @@ -46,6 +46,34 @@ + + + + Allow JavaScript to change window size + + + + + + + Allow JavaScript to hide menu bar + + + + + + + Allow JavaScript to hide status bar + + + + + + + Allow JavaScript to hide tool bar + + + From bba5d3680d3629afa42ca859085078d3d1312627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mladen=20Pejakovi=C4=87?= Date: Fri, 28 Dec 2012 19:54:34 +0100 Subject: [PATCH 3/5] JavaScript privacy options, update, part2 --- src/lib/other/qzsettings.cpp | 4 ++++ src/lib/other/qzsettings.h | 4 ++++ src/lib/popupwindow/popupwebpage.cpp | 6 +++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lib/other/qzsettings.cpp b/src/lib/other/qzsettings.cpp index 6fce57f39..f8c9e862d 100644 --- a/src/lib/other/qzsettings.cpp +++ b/src/lib/other/qzsettings.cpp @@ -46,6 +46,10 @@ void QzSettings::loadSettings() loadTabsOnActivation = settings.value("LoadTabsOnActivation", false).toBool(); autoOpenProtocols = settings.value("AutomaticallyOpenProtocols", QStringList()).toStringList(); blockedProtocols = settings.value("BlockOpeningProtocols", QStringList()).toStringList(); + allowJsGeometryChange = settings.value("allowJavaScriptGeometryChange", false).toBool(); + allowJsHideMenuBar = settings.value("allowJavaScriptHideMenuBar", false).toBool(); + allowJsHideStatusBar = settings.value("allowJavaScriptHideStatusBar", false).toBool(); + allowJsHideToolBar = settings.value("allowJavaScriptHideToolBar", false).toBool(); settings.endGroup(); settings.beginGroup("Browser-Tabs-Settings"); diff --git a/src/lib/other/qzsettings.h b/src/lib/other/qzsettings.h index b5a452606..24f0620bc 100644 --- a/src/lib/other/qzsettings.h +++ b/src/lib/other/qzsettings.h @@ -47,6 +47,10 @@ public: // Web-Browser-Settings int defaultZoom; bool loadTabsOnActivation; + bool allowJsGeometryChange; + bool allowJsHideMenuBar; + bool allowJsHideStatusBar; + bool allowJsHideToolBar; QStringList autoOpenProtocols; QStringList blockedProtocols; diff --git a/src/lib/popupwindow/popupwebpage.cpp b/src/lib/popupwindow/popupwebpage.cpp index 2ff9a2b56..1e1dcd750 100644 --- a/src/lib/popupwindow/popupwebpage.cpp +++ b/src/lib/popupwindow/popupwebpage.cpp @@ -21,6 +21,7 @@ #include "qupzilla.h" #include "tabwidget.h" #include "tabbedwebview.h" +#include "qzsettings.h" #include #include @@ -56,7 +57,7 @@ PopupWebPage::PopupWebPage(QWebPage::WebWindowType type, QupZilla* mainClass) void PopupWebPage::slotGeometryChangeRequested(const QRect &rect) { - if (rect.isValid()) { + if (rect.isValid() && qzSettings->allowJsGeometryChange) { m_geometry = rect; m_createNewWindow = true; } @@ -64,16 +65,19 @@ void PopupWebPage::slotGeometryChangeRequested(const QRect &rect) void PopupWebPage::slotMenuBarVisibilityChangeRequested(bool visible) { + if (!qzSettings->allowJsHideMenuBar) return; m_menuBarVisible = visible; } void PopupWebPage::slotStatusBarVisibilityChangeRequested(bool visible) { + if (!qzSettings->allowJsHideStatusBar) return; m_statusBarVisible = visible; } void PopupWebPage::slotToolBarVisibilityChangeRequested(bool visible) { + if (!qzSettings->allowJsHideToolBar) return; m_toolBarVisible = visible; } From 11758c3687c77ec5ba604f34629ac23acc18edb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mladen=20Pejakovi=C4=87?= Date: Sat, 29 Dec 2012 13:58:30 +0100 Subject: [PATCH 4/5] Change default values --- src/lib/other/qzsettings.cpp | 8 ++++---- src/lib/preferences/jsoptions.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/other/qzsettings.cpp b/src/lib/other/qzsettings.cpp index f8c9e862d..1138316c4 100644 --- a/src/lib/other/qzsettings.cpp +++ b/src/lib/other/qzsettings.cpp @@ -46,10 +46,10 @@ void QzSettings::loadSettings() loadTabsOnActivation = settings.value("LoadTabsOnActivation", false).toBool(); autoOpenProtocols = settings.value("AutomaticallyOpenProtocols", QStringList()).toStringList(); blockedProtocols = settings.value("BlockOpeningProtocols", QStringList()).toStringList(); - allowJsGeometryChange = settings.value("allowJavaScriptGeometryChange", false).toBool(); - allowJsHideMenuBar = settings.value("allowJavaScriptHideMenuBar", false).toBool(); - allowJsHideStatusBar = settings.value("allowJavaScriptHideStatusBar", false).toBool(); - allowJsHideToolBar = settings.value("allowJavaScriptHideToolBar", false).toBool(); + allowJsGeometryChange = settings.value("allowJavaScriptGeometryChange", true).toBool(); + allowJsHideMenuBar = settings.value("allowJavaScriptHideMenuBar", true).toBool(); + allowJsHideStatusBar = settings.value("allowJavaScriptHideStatusBar", true).toBool(); + allowJsHideToolBar = settings.value("allowJavaScriptHideToolBar", true).toBool(); settings.endGroup(); settings.beginGroup("Browser-Tabs-Settings"); diff --git a/src/lib/preferences/jsoptions.cpp b/src/lib/preferences/jsoptions.cpp index baf109580..4eb27d95f 100644 --- a/src/lib/preferences/jsoptions.cpp +++ b/src/lib/preferences/jsoptions.cpp @@ -33,10 +33,10 @@ JsOptions::JsOptions(QWidget* parent) settings.beginGroup("Web-Browser-Settings"); ui->jscanCloseWindow->setChecked(settings.value("allowJavaScriptCloseWindow", false).toBool()); ui->jscanOpenWindow->setChecked(settings.value("allowJavaScriptOpenWindow", false).toBool()); - ui->jscanChangeSize->setChecked(settings.value("allowJavaScriptGeometryChange", false).toBool()); - ui->jscanHideMenu->setChecked(settings.value("allowJavaScriptHideMenuBar", false).toBool()); - ui->jscanHideStatus->setChecked(settings.value("allowJavaScriptHideStatusBar", false).toBool()); - ui->jscanHideTool->setChecked(settings.value("allowJavaScriptHideToolBar", false).toBool()); + ui->jscanChangeSize->setChecked(settings.value("allowJavaScriptGeometryChange", true).toBool()); + ui->jscanHideMenu->setChecked(settings.value("allowJavaScriptHideMenuBar", true).toBool()); + ui->jscanHideStatus->setChecked(settings.value("allowJavaScriptHideStatusBar", true).toBool()); + ui->jscanHideTool->setChecked(settings.value("allowJavaScriptHideToolBar", true).toBool()); ui->jscanAccessClipboard->setChecked(settings.value("allowJavaScriptAccessClipboard", false).toBool()); settings.endGroup(); From 85979cd378883501915d110ffc4eb09cb349db2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mladen=20Pejakovi=C4=87?= Date: Sat, 29 Dec 2012 14:05:19 +0100 Subject: [PATCH 5/5] Cosmetic changes to JavaScript options dialog --- src/lib/preferences/jsoptions.ui | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/lib/preferences/jsoptions.ui b/src/lib/preferences/jsoptions.ui index d73859db8..b383625e9 100644 --- a/src/lib/preferences/jsoptions.ui +++ b/src/lib/preferences/jsoptions.ui @@ -6,14 +6,21 @@ 0 0 - 302 - 226 + 214 + 247 JavaScript Options + + + + Allow JavaScript to: + + + @@ -32,7 +39,7 @@ - Allow JavaScript to close windows + Close windows @@ -42,42 +49,42 @@ If enabled, pages will be allowed to automatically open popup windows - Allow JavaScript to open popup windows + Open popup windows - Allow JavaScript to change window size + Change window size - Allow JavaScript to hide menu bar + Hide menu bar - Allow JavaScript to hide status bar + Hide status bar - Allow JavaScript to hide tool bar + Hide tool bar - Allow JavaScript to access clipboard + Access clipboard