chrome Pop-up blocker when to re-check after allowing page
Asked Answered
N

1

6

I've having app which sometimes open the popup blocker, when the user run the application chrome have some flag in the url box (right side) which tell to the user that the pop-up is blocked ,in this case I give to the user in addition new warning message like "please pay attention the page was blocked please enable it..."

My question is when and in which term I need to do this check again ,assume the user allow the new App page

  1. if user close and open the browser does he need to enable this pop-up again ?
  2. I know that if the user will run it in diffrent chrome versions (like canary or beta) he probably need to confirm this page again but my question in which cases the pop-up will show again to the same user(which confirm it before)

  3. In which case after allowing the App to run the pop-up blocker will block it again?

Btw I saw that in my company they add the exception to the popup blocker with some automated process, how it can be? there is a code that can do that?(strange...)

I see it when I click on setting search for pop -> privacy -> content settings -> manage exception and then I see enter image description here

Norby answered 27/10, 2016 at 10:57 Comment(2)
"I need to konw when the pop-up blocker will block specifiecd page again after user enable the page (allow it in the browser)" The setting should remain until removed by user. Was the setting removed when launched new instance of chrome, chromium where setting was previously set?Blew
@Blew - thanks , sorry but not sure that I got this question "Was the setting removed when launched new instance of chrome, chromium where setting was previously set? " 2. Do you know how its possible to the company to add this privacy settings ( i've addtional for my company entries domain pattern...), how this is possible?Norby
B
3
  1. Do you know how its possible to the company to add this privacy settings ( i've addtional for my company entries domain pattern...), how this is possible?

Policies can be set which override user Preferences set at Settings.

See Documentation for Administrators, follow links at Windows Quick Start, Mac Quick Start, or Linux Quick Start. Read Configuring Other Preferences, Policy Settings in Chrome

Should I use a Preference, or a Policy?

If you want to set some specific behavior that is accomplished by both a preference and a policy, and you're not sure which one you should use, simply answer: do you want users to be able to change this setting?

User cannot change policies at will, but they can change their preferences.


Note, these changes to Preferences file should be made when chrome, chromium is closed, that is does not have an ongoing process instance to avoid a SingletonLock file not being created in Default directory a when chrome, chromium is launched again.

To set the preference at Preferences file in browser configuration file, for example $ gedit ~/.config/chromium/Default/Preferences

"popups":{"[*.]domain1.com,*":{"setting":2},"[*.]domain2.com,*":{"setting":1}}

where 2 blocks popups, 1 allows popups, see also DefaultPopupsSetting.


The icon at the right of the Behavior at Pop-up exceptions at Settings indicates

This setting is enforced by your administrator.

Policies can applied to devices Set Chrome policies for devices or users Set Chrome policies for users by the administrator.

The formats for policies at different platforms are

Example value:

Windows:

Software\Policies\Google\Chrome\PopupsAllowedForUrls\1 = "https://www.example.com"
Software\Policies\Google\Chrome\PopupsAllowedForUrls\2 = "[*.]example.edu"

Android/Linux:

["https://www.example.com", "[*.]example.edu"]

Mac:

<array>
<string>https://www.example.com</string>
  <string>[*.]example.edu</string>
</array>

For example, to create a mandatory policy for the device for popups at *nix platforms you can create a .json file at /etc/chromium-browser/policies/managed/

$ sudo touch /etc/chromium-browser/policies/managed/popup_policy.json
$ gksudo gedit /etc/chromium-browser/policies/managed/popup_policy.json

then set the popup policies for PopupsBlockedForUrls, PopupsAllowedForUrls

{
  "PopupsBlockedForUrls": ["[*.]example.com", "[*.]example1.com]"],
  "PopupsAllowedForUrls": ["[*.]example2.com", "[*.]example3.com]"]
}

When chrome, chromium is launched you can verify the policy is being enforced by navigating to

chrome://policy

where the policies should be listed; for example

Applies to    Level        Source      Policy name             Policy value                          Status
Machine       Mandatory    Platform    PopupsBlockedForUrls    [*.]example.com, [*.]example1.com]    OK

A sample policy list template is available at policy_templates.json, see also Policy Templates.

Blew answered 31/10, 2016 at 21:1 Comment(5)
Thanks ! so currently two questoin 1. so just to verify, I guess that somehow by code change the privacy setting will not be an option correct ? 2. Regard my first question : In which case after allowing the App (from the popup blocker place right to the URL ) to run it will block again? I mean after allowing the app to run the domain is inserted to the privacy setting and until I will not remove it manually the app will be able to run over and over again ?Norby
@RaynD "1. so just to verify, I guess that somehow by code change the privacy setting will not be an option correct ?" Not sure what you mean. User can change Settings when choose, though possibly not administrator Policy settings. "2. In which case after allowing the App (from the popup blocker place right to the URL ) to run it will block again? I mean after allowing the app to run the domain is inserted to the privacy setting and until I will not remove it manually the app will be able to run over and over again ?" The setting should remain until removed by user.Blew
I mean if I want to change the settings in javascript code i.e. add domain by code to the user...Norby
@RaynD No. Do not believe that is possible. User action should allow or block a domain.Blew
@RaynD User action could upload Preferences file to a <textarea> element, where user could edit file, then user could save file to same directory, to overwrite existing file. Though you cannot browse user filesystem for file, select file, edit file, then save to user filesystem using javascript without user action.Blew

© 2022 - 2024 — McMap. All rights reserved.