Topic on Extension talk:AbuseFilter

How to use this only allow some link?

This topic was hidden by Tunglinwu
Reason: 此方式不完全有效
6
Summary by Tunglinwu

use !(added_links irlike "^(?:(https?:)?\/\/(allowed1.com|allowed2.org|allowed3.net)\n?)*$") only allow some link.

Can use this block ad link.


But it in [https://allow.com link ] until be block.

Tunglinwu (talkcontribs)

If I only want to allow some links

e.g. i only allow http://www.abc.com/*

use all_links?

all_link !== "http://www.abc.com"

Daimona Eaytoy (talkcontribs)

I think you should use added_lines instead of all_links (i.e. ignore pre-existing links). AF lacks support for array intersection, so perhaps your best option could be something like !(added_links irlike "(https?:)?\/\/(allowed1.com|allowed2.org|allowed3.net)") [not tested].

Tunglinwu (talkcontribs)

No, it can't use.

All links trigger "added_links" function include your way.

Daimona Eaytoy (talkcontribs)

Ah, my example was incomplete. The actual check would be: !(added_links irlike "^(?:(https?:)?\/\/(allowed1.com|allowed2.org|allowed3.net)\n?)*$")

A quick test would seem to indicate that it works.

Tunglinwu (talkcontribs)

IF in [https://allow.com ALLOW] until be block.

Tunglinwu (talkcontribs)

it's worked, thank you.