Skip to content

feat: Accept more domains in IPM create_on_page_dialog [#1485]

Pedro Diogo Machado requested to merge 1485-ipm-commands-accept-more-domains into next

This MR adds a new feature to the IPM command create_on_page_dialog. The parameter button_target now accepts more domains. Beforehand it would only take the user to pages inside "https://adblockplus.org" and the docs said button_target should be a "URL without the domain name (i.e. path name plus query string)" but now it accepts full URLs as well, as long as the domain is "https://adblockplus.org", "https://blog.getadblock.com", "https://helpcenter.getadblock.com" or "https://vpn.getadblock.com".

In prefs, a new variable defaults.ipm_safe_origins was added to define which domains are considered safe. The old defaults.ipm_safe_origin was renamed to defaults.ipm_default_safe_origin and is used as the base domain when the URL passed in button_target is a relative URL.

To do before merging this MR:

Edited by Pedro Diogo Machado

Merge request reports