FEATURE: onebox everything by default

FEATURE: new 'max_oneboxes_per_post' site setting
FEATURE: change onebox whitelist to a blacklist
PERF: debounce the loading of oneboxes
PERF: improve perf of mention links in preview
FIX: sort loading of custom oneboxer
This commit is contained in:
Régis Hanol
2016-10-24 12:46:22 +02:00
parent 81e2a0099f
commit 3841cd9a7f
8 changed files with 98 additions and 116 deletions

View File

@ -348,12 +348,9 @@ module SiteSettingExtension
end
def filter_value(name, value)
# filter domain name
if %w[disabled_image_download_domains onebox_domains_whitelist exclude_rel_nofollow_domains email_domains_blacklist email_domains_whitelist white_listed_spam_host_domains].include? name
if %w[disabled_image_download_domains onebox_domains_blacklist exclude_rel_nofollow_domains email_domains_blacklist email_domains_whitelist white_listed_spam_host_domains].include? name
domain_array = []
value.split('|').each { |url|
domain_array.push(get_hostname(url))
}
value.split('|').each { |url| domain_array << get_hostname(url) }
value = domain_array.join("|")
end
value