Bug 396024 - Allow per-site configuration of JavaScript
Summary: Allow per-site configuration of JavaScript
Status: RESOLVED FIXED
Alias: None
Product: Falkon
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-30 14:31 UTC by Christoph Feck
Modified: 2024-06-12 20:58 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feck 2018-06-30 14:31:21 UTC
Since there is no NoScript-plugin, I propose a simple per-site JavaScript configuration (similar to cookies). A toolbar button could temporarily override the default.

Rationale: I prefer to surf with JavaScript off by default, and only want to enable it for sites that need it, permanently and temporarily.
Comment 1 Xavier Brochard 2018-06-30 21:59:33 UTC
The StatusBar Icons extension add a javascript icon at the bottom right of the window that let you temporarily disable Javascript.
Comment 2 Christoph Feck 2018-09-06 20:01:04 UTC
I tried it, but it doesn't allow the reverse. If I have JavaScript disabled, the button doesn't allow me to temporarily enable it. Starting with enabled, then later disabling it defeats the purpose; any malformed site will have already executed its scripts before I get the chance to disable it.
Comment 3 The_assassin 2019-04-28 15:11:53 UTC
There is a Python extension at https://store.kde.org/browse/cat/571/
Please consider closing the issue if that extension are useful for you!
Also, please do not report here issues related to that extension, thanks!
Comment 4 Christoph Feck 2019-04-29 01:05:59 UTC
It doesn't have per-site configuration, so no, it is not useful.
Comment 5 The_assassin 2019-04-29 05:03:34 UTC
Yes, it is per-tab, but you just could open the new site in new tab, or just click the button before open a new site in same tab.
Comment 6 Horstl 2019-05-14 17:19:35 UTC
I would like to test the mentioned Python extension and downloaded javascriptbutton.zip, but I don't know what to do with it!
It says: "Requires PyFalkon plug-in to be enabled in Falkon." => how do I have to do that in Falkon 3.1.0?
And what do I have to do with the zip-file afterwards?
Thanks in advance!
Comment 7 The_assassin 2019-05-14 19:40:43 UTC
If Falkon was built with PyFalkon plug-in, it is already enabled and no additional action are required.
Regarding extensions, if you are using most recent git version of Falkon, you could just click on the "INSTALL" button on the extension page, otherwise, just extract it to ~/.config/falkon/plugins
Example command: unzip javascriptbutton.zip -d ~/.config/falkon/plugins
Comment 8 Horstl 2019-05-16 15:59:19 UTC
Doesn't work for me, unfortunately.
How can I determine, if my Falkon was built with PyFalkon plug-in?
And what would I have to ask the packager of my distro for, to enable it?
Which compiler-options or whatsoever does he need?
Comment 9 The_assassin 2019-05-16 16:16:05 UTC
Which distribution you are using?
Comment 10 Horstl 2019-05-17 17:55:41 UTC
I'm using PCLinuxOS
Comment 11 The_assassin 2019-05-17 19:49:08 UTC
(In reply to Horstl from comment #10)

As far as I see, Falkon is built without Python plug-in for your distribution. You could ask packages maintainers to enable python3-pyside support for Falkon. If you want to build it yourself, you need to install "python3-pyside-devel" and "python3-shiboken-devel" packages.
Good luck!
Comment 12 Horstl 2020-02-17 16:00:42 UTC
After working for several months, the extension JavaScriptButton causes the following failure in my PCLinuxOS-install of Falkon:
"Falkon: Python plugin support initialized
falkon: symbol lookup error: /usr/lib64/plugins/falkon/PyFalkon.so: undefined symbol: _ZN8Shiboken10ObjectType20introduceWrapperTypeEP7_objectPKcS4_P11PyType_SpecS4_PFvPvEP13SbkObjectTypeS2_j"
According to Texstar from PCLinuxOS this is a glibc 2.31 issue and: "The browser developers are aware of the issue and are working to fix the problem".

Other updates that may be the cause for the problem were:
python-rpm (4.8.1-11pclos2020) to 4.8.1-12pclos2020
python3-pyside2 (5.12.2-2pclos2019) to 5.12.6-1pclos2020
python3-shiboken2 (5.12.2-2pclos2019) to 5.12.6-1pclos2020

Can you fix this for Falkon too, please?
Comment 13 Juraj 2024-06-12 20:58:52 UTC
Git commit 0dd534d165905b50dc9c54dd8cc08be83dbcb787 by Juraj Oravec.
Committed on 12/06/2024 at 20:56.
Pushed by jurajo into branch 'master'.

Implement per site permissions in database

This includes:
- Cookies
- HTML5 permissions
- WebAttributes
- Panels, tabs, GUI.
Related: bug 409496, bug 451357, bug 392711

Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>

M  +1    -0    autotests/CMakeLists.txt
A  +111  -0    autotests/sitesettingstest.cpp     [License: GPL (v3+)]
A  +47   -0    autotests/sitesettingstest.h     [License: GPL (v3+)]
M  +14   -3    src/lib/CMakeLists.txt
M  +17   -0    src/lib/app/mainapplication.cpp
M  +3    -0    src/lib/app/mainapplication.h
M  +179  -2    src/lib/app/profilemanager.cpp
M  +3    -0    src/lib/app/profilemanager.h
M  +41   -28   src/lib/cookies/cookiejar.cpp
M  +0    -3    src/lib/cookies/cookiejar.h
M  +42   -12   src/lib/cookies/cookiemanager.cpp
M  +3    -0    src/lib/cookies/cookiemanager.h
M  +31   -0    src/lib/data/data/browsedata.sql
M  +60   -0    src/lib/other/siteinfo.cpp
M  +6    -0    src/lib/other/siteinfo.h
M  +37   -2    src/lib/other/siteinfo.ui
A  +130  -0    src/lib/other/siteinfopermissionitem.cpp     [License: GPL (v3+)]
A  +64   -0    src/lib/other/siteinfopermissionitem.h     [License: GPL (v3+)]
A  +86   -0    src/lib/other/siteinfopermissionitem.ui
A  +627  -0    src/lib/other/sitesettingsmanager.cpp     [License: GPL (v3+)]
A  +141  -0    src/lib/other/sitesettingsmanager.h     [License: GPL (v3+)]
M  +48   -8    src/lib/preferences/preferences.cpp
M  +0    -1    src/lib/preferences/preferences.h
M  +181  -160  src/lib/preferences/preferences.ui
A  +40   -0    src/lib/preferences/sitesettingsattributesitem.cpp     [License: GPL(v3.0+)]
A  +40   -0    src/lib/preferences/sitesettingsattributesitem.h     [License: GPL(v3.0+)]
A  +49   -0    src/lib/preferences/sitesettingsattributesitem.ui
A  +90   -0    src/lib/preferences/sitesettingsbrowsedialog.cpp     [License: GPL(v3.0+)]
A  +40   -0    src/lib/preferences/sitesettingsbrowsedialog.h     [License: GPL(v3.0+)]
R  +48   -88   src/lib/preferences/sitesettingsbrowsedialog.ui [from: src/lib/tools/html5permissions/html5permissionsdialog.ui - 058% similarity]
A  +73   -0    src/lib/preferences/sitesettingshtml5item.cpp     [License: GPL(v3.0+)]
A  +45   -0    src/lib/preferences/sitesettingshtml5item.h     [License: GPL(v3.0+)]
A  +52   -0    src/lib/preferences/sitesettingshtml5item.ui
D  +0    -190  src/lib/tools/html5permissions/html5permissionsdialog.cpp
M  +16   -81   src/lib/tools/html5permissions/html5permissionsmanager.cpp
M  +0    -8    src/lib/tools/html5permissions/html5permissionsmanager.h
M  +8    -0    src/lib/tools/sqldatabase.cpp
M  +2    -0    src/lib/tools/sqldatabase.h
M  +30   -2    src/lib/webengine/webpage.cpp
M  +1    -0    src/plugins/CMakeLists.txt
M  +2    -0    src/plugins/PyFalkon/CMakeLists.txt
M  +3    -0    src/plugins/PyFalkon/pyfalkon_global.h
M  +6    -0    src/plugins/PyFalkon/typesystem_pyfalkon.xml
A  +14   -0    src/plugins/SiteSettingsView/CMakeLists.txt
A  +2    -0    src/plugins/SiteSettingsView/Messages.sh
A  +9    -0    src/plugins/SiteSettingsView/sitesettingsview.json
A  +80   -0    src/plugins/SiteSettingsView/sitesettingsview_controller.cpp     [License: GPL (v3+)]
C  +18   -19   src/plugins/SiteSettingsView/sitesettingsview_controller.h [from: src/lib/tools/html5permissions/html5permissionsmanager.h - 050% similarity]
A  +66   -0    src/plugins/SiteSettingsView/sitesettingsview_plugin.cpp     [License: GPL (v3+)]
R  +21   -28   src/plugins/SiteSettingsView/sitesettingsview_plugin.h [from: src/lib/tools/html5permissions/html5permissionsdialog.h - 050% similarity]
A  +276  -0    src/plugins/SiteSettingsView/sitesettingsview_widget.cpp     [License: GPL (v3+)]
A  +66   -0    src/plugins/SiteSettingsView/sitesettingsview_widget.h     [License: GPL (v3+)]
M  +1    -0    src/plugins/StatusBarIcons/sbi_javascripticon.cpp

https://invent.kde.org/network/falkon/-/commit/0dd534d165905b50dc9c54dd8cc08be83dbcb787