By Opera Software

From Opera 15 onward, Opera 11 & 12’s extension format is no longer supported, and instead, we’ve switched to Chromium’s extension model. Check out our new documentation for developing extensions for Opera 15 and higher and start building your own extensions.


A boolean property specifying whether a given URL Filter rule should apply to third-party domains. The value true indicates that only domains with a different origin are matched by this option. The value false indicates that only domains with the same origin are matched by this option. The value null, or if the thirdParty property is not specified, indicates that all domains are matched by this option.

This property is passed within a RuleOptions object as a parameter for URL Filter methods.


boolean thirdParty


The following example blocks any content from the domain, but only when it's included in a web page as third-party code, i.e. in domains.

  The configuration file ('config.xml').
<?xml version='1.0' encoding='utf-8'?>
<widget xmlns="">
    <feature name="opera:urlfilter"/>
// The background process (e.g. index.html)

// Check that the URL Filter API exists
if (typeof opera.extension.urlfilter != 'undefined') {
  // Set the options for the filter rule
  var ruleOptions = {
    thirdParty: true

  opera.extension.urlfilter.block.add('||*', ruleOptions);

Note the use of || which is a hostname mark. This indicates that the subsequent characters should begin matching from any host name in the URL. For example, ||* matches,, or similar. However, it will not match

This article is licensed under a Creative Commons Attribution 3.0 Unported license.


No new comments accepted.