chrome Pop-up 允许页面后何时 re-check 拦截器

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

我的应用程序有时会打开弹出窗口拦截器,当用户 运行 应用程序 chrome 在 url 框(右侧)中有一些标志时告诉pop-up 被阻止的用户 ,在这种情况下,我给用户 另外新的警告消息 如 "please pay attention the page was blocked please enable it..."

我的问题是我需要在何时以及在哪个学期再次进行此检查,假设用户允许新的应用程序页面

  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?

顺便说一句,我看到在我的公司他们将例外添加到弹出窗口阻止程序 有了一些自动化的过程,它怎么可能?有代码可以做到吗?(奇怪...)

当我点击设置搜索流行音乐 -> 隐私 -> 内容设置 -> 管理异常时我看到了,然后我看到了

  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 可以设置覆盖用户 PreferencesSettings 设置。

参见 Documentation for Administrators, follow links at Windows Quick Start, Mac Quick Start, or Linux Quick Start。 阅读 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.


注意,应该在 chrome 时对 Preferences 文件进行这些更改,chromium 已关闭,即没有正在进行的流程实例以避免 SingletonLock 文件未被在 Default 目录 a 中创建,当 chrome,chromium 再次启动。

在浏览器配置文件中的 Preferences 文件中设置首选项,例如 $ gedit ~/.config/chromium/Default/Preferences

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

其中 2 阻止弹出窗口,1 允许弹出窗口,另请参阅 DefaultPopupsSetting


Behavior at Pop-up exceptions at Settings 右边的图标表示

This setting is enforced by your administrator.

管理员可以将策略应用到设备Set Chrome policies for devices or users Set Chrome policies for users

不同平台的策略格式为

Example value:

Windows:

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

Android/Linux:

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

Mac:

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

例如,要在 *nix 平台上为弹出窗口的设备创建强制策略,您可以在 /etc/chromium-browser/policies/managed/

处创建一个 .json 文件
$ sudo touch /etc/chromium-browser/policies/managed/popup_policy.json
$ gksudo gedit /etc/chromium-browser/policies/managed/popup_policy.json

然后为 PopupsBlockedForUrlsPopupsAllowedForUrls

设置弹出策略
{
  "PopupsBlockedForUrls": ["[*.]example.com", "[*.]example1.com]"],
  "PopupsAllowedForUrls": ["[*.]example2.com", "[*.]example3.com]"]
}

当 chrome 启动 Chromium 时,您可以通过导航到

来验证政策是否得到执行
chrome://policy

应在何处列出政策;例如

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

示例策略列表模板可在 policy_templates.json, see also Policy Templates.

获得。