Bug 207406

Summary: Konqueror does not allow enabling Javascript for select sites
Product: [Applications] konqueror Reporter: Daniel <danielbarrettbolton>
Component: khtmlAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: maksim
Priority: NOR    
Version: 4.3.1   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Daniel 2009-09-15 02:00:42 UTC
Version:            (using KDE 4.3.1)
OS:                Linux
Installed from:    Debian testing/unstable Packages

I only want to allow JavaScript to run on select domains. For Iceweasel, I simply use NoScript. However, it seems that the domain-specific JS policies that I add in Konqueror do not work. For example, consider Youtube. I have the "enable Javascript globally" button unchecked. I have tried adding the following domains: youtube.com and ytimg.com. For each of these, I set the policy to "Allow" and chose "Allow" on all radio buttons below. However, when I try to watch a video, it says that JS is not enabled. When I enable JS globally, the videos will play. This is not an issue with flash. I was informed by an administrator on the KDE forum that this is bug in Konqueror: http://forum.kde.org/viewtopic.php?f=18&t=81053

Since I only want to allow JS for a few select domains, it is impractical to have to enable JS globally. It should be possible to enable JS only on specified domains.
Comment 1 Christoph Feck 2009-09-18 17:16:35 UTC
I can confirm this, but the bug is very old, there have to be duplicates :)

Sometimes you can work around that by adding both ".domain.com" and "domain.com" to the exception list, sometimes it works by looking what other domains the scripts reference. But very often, sites cannot be made to work unless JS is enabled globally. It looks like Konqueror simply reports that JS is disabled, without looking into the exception list.

Additionally, setting "JavaScript" in "Tools/HTML Settings" menu does not help solving the problem.
Comment 2 Maksim Orlovich 2009-09-18 17:27:37 UTC
There is code for hierarchical checking per domain --- see KHTMLSettings::isJavaScriptEnabled and lookup_hostname_policy.

Ahhh.... But that's used only for requestScript --- part creation doesn't seem to pass in the domain (d->m_bJScriptEnabled = d->m_settings->isJavaScriptEnabled()), so that's the likely place where the bug is.

(Hmm, coincidentally those bitfield enums will break on MSVC. Probably should just get rid of them --- overoptimization)
Comment 3 Andrew Crouthamel 2018-11-06 15:14:47 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Andrew Crouthamel 2018-11-18 03:22:07 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Justin Zobel 2022-12-19 00:13:36 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 6 Bug Janitor Service 2023-01-03 05:26:41 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Bug Janitor Service 2023-01-18 05:11:49 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!