Site https://piwik.gentoo.org/piwik.js
Accept from [DOMAIN_OF_SITE_WHERE_YOU_WANT_THAT_SCRIPT_ALLOWED]
Site ^https?://.+/piwik\.js
Deny
replacing [DOMAIN_OF_SITE_WHERE_YOU_WANT_THAT_SCRIPT_ALLOWED] with the actual domain of the site that includes that script, or ALL if you want it allowed from anywhere
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:32.0) Gecko/20100101 Firefox/32.0 SeaMonkey/2.29a1
Site https://piwik.gentoo.org/piwik.js Accept from .gentoo.org
Site https://webstats.gnome.org/piwik.js Accept from .gentoo.org
Site ^https?://[a-zA-Z0-9&%/\?=\._:;-]+/piwik\.js
Deny
Super, Thank you very much
Mozilla/5.0 (Windows NT 6.0; rv:29.0) Gecko/20100101 Firefox/29.0
Site https://piwik.gentoo.org/piwik.js Accept from .gentoo.org
Site https://webstats.gnome.org/piwik.js Accept from .gnome.org
Site ^https?://[a-zA-Z0-9&%/\?=\._:;-]+/piwik\.js
Deny
Now it is right
Mozilla/5.0 (Windows NT 6.0; rv:29.0) Gecko/20100101 Firefox/29.0
#- analytics whitelist
Site https://piwik.gentoo.org Accept from .gentoo.org
Site ^https?://piwik\.
Deny
Site http://sourceforge.net/apps/piwik/ Accept from sourceforge.net
Site ^https?://[a-zA-Z0-9&%/\?=\._:;-]+/piwik/
Deny
Site https://webstats.gnome.org/piwik.js Accept from .gnome.org
Site http://sourceforge.net/apps/piwik/supertuxkart/piwik.js Accept from this-sucks.net
Site ^https?://[a-zA-Z0-9&%/\?=\._:;-]+/piwik\.js
Deny
#- analytics whitelists
Site http://sourceforge.net/apps/piwik/supertuxkart/piwik.js
Accept from this-sucks.net
Deny
Site https://piwik.gentoo.org
Accept from .gentoo.org
Site http://sourceforge.net/apps/piwik/
Accept from sourceforge.net
Site https://webstats.gnome.org/piwik.js
Accept from .gnome.org
Site ^https?://piwik\. ^https?://[a-zA-Z0-9&%/\?=\._:;-]+/piwik/ ^https?://[a-zA-Z0-9&%/\?=\._:;-]+/piwik\.js
Deny
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26
Site https://piwik.gentoo.org/piwik.js
Accept from .gentoo.org
Site ^https?://piwik\.
Deny
# this rule isn't matched for blocking again all
Site ^https?://[a-zA-Z0-9_\-\.\[\]:/@~;,\?&=%#]+/piwik\.js
Deny
Not OK
I can't use new rules that breaking the previous.
Mozilla/5.0 (Windows NT 6.0; rv:29.0) Gecko/20100101 Firefox/29.0
#- block all in 1. level domain without piwik.alpha.org/script/piwik.js
Site http://piwik.alpha.org/script/piwik.js
Accept from .alpha.org
Site http://piwik.
Deny
#- block all beyond directory script or js like piwik.gentoo.org/script/virus.js and piwik.beta.org/js/virus.js but not gift.org/js/gifts.js
Site http://gift.org/js/gifts.js
Accept from gift.org
Site ^http://.*/(js|script)/
Deny
#- block all gifts.js but not from piwik.alpha.org/gifts/gifts.js
Site http://piwik.org/gifts/gifts.js
Accept from .alpha.org
Site http://*/gifts.js
Deny
The problem is in the first rule that block the exception in the third rule. Simply in NoScript isn't possible advance exceptions.
Mozilla/5.0 (Windows NT 6.0; rv:29.0) Gecko/20100101 Firefox/29.0
#alpha.org whitelists
Site http://piwik.alpha.org/script/piwik.js http://piwik.org/gifts/gifts.js
Accept from .alpha.org
#gift.org whitelist
Site http://gift.org/js/gifts.js
Accept from gift.org
#- block all in 1. level domain
Site http://piwik.
Deny
#- block all beyond directory script or js like piwik.gentoo.org/script/virus.js and piwik.beta.org/js/virus.js
Site ^http://.*/(js|script)/
Deny
#- block all gifts.js but not from piwik.alpha.org/gifts/gifts.js
Site http://*/gifts.js
Deny
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26
#- analytics whitelists
Site https://piwik.gentoo.org/piwik.js #- begin
Accept from .gentoo.org
Site http://sourceforge.net/apps/piwik/supertuxkart/piwik.js #- middle
Accept from this-sucks.net #- the domain isn't right wrote therefore has to be blocked but isn't
Site https://webstats.gnome.org/piwik.js #- end
Accept from .gnome.org
Site ^https?://piwik\. #-begin
Deny
Site ^https?://[a-zA-Z0-9_\-\.\[\]:/@~;,\?&=%#]+/piwik/ #-middle
Deny
Site ^https?://[a-zA-Z0-9_\-\.\[\]:/@~;,\?&=%#]+/piwik\.js #- end
Deny
Mozilla/5.0 (Windows NT 6.0; rv:29.0) Gecko/20100101 Firefox/29.0
Where are you seeing the sourceforge.net script included?
If you're trying to go there directly in the browser, and it's loading, I see that too, and it looks like that's expected behavior resulting from the presence of the exception.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26