| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 {# | 
|  | 2  # This file is part of the Adblock Plus website, | 
|  | 3  # Copyright (C) 2006-2015 Eyeo GmbH | 
|  | 4  # | 
|  | 5  # Adblock Plus is free software: you can redistribute it and/or modify | 
|  | 6  # it under the terms of the GNU General Public License version 3 as | 
|  | 7  # published by the Free Software Foundation. | 
|  | 8  # | 
|  | 9  # Adblock Plus is distributed in the hope that it will be useful, | 
|  | 10  # but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|  | 11  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|  | 12  # GNU General Public License for more details. | 
|  | 13  # | 
|  | 14  # You should have received a copy of the GNU General Public License | 
|  | 15  # along with Adblock Plus.  If not, see <http://www.gnu.org/licenses/>. | 
|  | 16  #} | 
|  | 17 | 
|  | 18 {% macro description(key_name, open="<p>", close="</p>") %} | 
|  | 19   {% for i in range(100) %} | 
|  | 20     {% if i == 0 %} | 
|  | 21       {% set current_key_name = key_name %} | 
|  | 22     {% else %} | 
|  | 23       {% set current_key_name = "%s%d" % (key_name, i) %} | 
|  | 24     {%- endif %} | 
|  | 25     {% if current_key_name in localedata %} | 
|  | 26       {{open|safe}}{{ current_key_name|translate(None, links[key_name])|unescape
     |safe }}{{close|safe}} | 
|  | 27     {% endif %} | 
|  | 28   {% endfor %} | 
|  | 29 {% endmacro %} | 
|  | 30 | 
|  | 31 {% macro return_type(return_type) %} | 
|  | 32   {% if return_type|truncate(1, True, "") == "I" %} | 
|  | 33     {{ return_type|linkify }} | 
|  | 34       {{ return_type -}} | 
|  | 35     </a> | 
|  | 36   {% else %} | 
|  | 37     {{ return_type }} | 
|  | 38   {% endif %} | 
|  | 39 {% endmacro %} | 
|  | 40 | 
|  | 41 {% block body %} | 
|  | 42   {% set interface=interface|parse_interface %} | 
|  | 43 | 
|  | 44   <h2>{{ "methods_and_properties"|translate }}</h2> | 
|  | 45   <ul> | 
|  | 46     {% for property in interface %} | 
|  | 47       {% if property.type == "method" %} | 
|  | 48         <li> | 
|  | 49           {{ return_type(property.return_type) }} | 
|  | 50           <a href="#method_{{ property.name }}" class="methodname">{{ property.n
     ame }}</a> | 
|  | 51           ( | 
|  | 52           {% for argument in property.arguments %} | 
|  | 53             {{ argument.type }} {{argument.name }} | 
|  | 54             {%- if not loop.last %},{% endif %} | 
|  | 55           {% endfor %} | 
|  | 56           ) | 
|  | 57         </li> | 
|  | 58       {% else %} | 
|  | 59       <li> | 
|  | 60         {{ property.modifier }} {{ property.type }} | 
|  | 61         <a href="#prop_{{ property.name }}" class="propname">{{ property.name }}
     </a> | 
|  | 62       </li> | 
|  | 63       {% endif %} | 
|  | 64     {% endfor %} | 
|  | 65   </ul> | 
|  | 66 | 
|  | 67   {% for property in interface %} | 
|  | 68     {% if property.type == "method" %} | 
|  | 69       <hr> | 
|  | 70       <p id="method_{{ property.name }}"> | 
|  | 71         {{ return_type(property.return_type) }} | 
|  | 72         <span class="methodname">{{ property.name }}</span> | 
|  | 73         ( | 
|  | 74         {% for argument in property.arguments %} | 
|  | 75           {{ argument.modifier }} {{ argument.type }} {{ argument.name }} | 
|  | 76           {%- if not loop.last %},{% endif %} | 
|  | 77         {% endfor %} | 
|  | 78         ) | 
|  | 79       </p> | 
|  | 80       {{ description(property.name + "Description") }} | 
|  | 81       <dl> | 
|  | 82         {% if property.version %} | 
|  | 83           <dt>Version:</dt> | 
|  | 84           <dd>{{ property.version }} and higher</dd> | 
|  | 85         {% endif %} | 
|  | 86         {% if property.arguments|length %} | 
|  | 87           <dt>Arguments:</dt> | 
|  | 88           {% for argument in property.arguments %} | 
|  | 89             <dd> | 
|  | 90               <span class="argumentname">{{ argument.name }}</span>: | 
|  | 91               {{ description(property.name + "Argument" + argument.name + "Descr
     iption", "", "") }} | 
|  | 92             </dd> | 
|  | 93           {% endfor %} | 
|  | 94         {% endif %} | 
|  | 95         {% if (property.name + "ReturnDescription") in localedata %} | 
|  | 96           <dt>Returns:</dt> | 
|  | 97           <dd>{{ (property.name + "ReturnDescription")|translate(None, links[pro
     perty.name + "ReturnDescription"]) }}</dd> | 
|  | 98         {% endif %} | 
|  | 99       </dl> | 
|  | 100      {% else %} | 
|  | 101       <hr> | 
|  | 102       <p id="prop_{{ property.name }}"> | 
|  | 103         {{ property.modifier }} {{ property.type }} | 
|  | 104         <span class="propname">{{ property.name }}</span> | 
|  | 105       </p> | 
|  | 106       {{ description(property.name + "Description") }} | 
|  | 107     {% endif %} | 
|  | 108   {% endfor %} | 
|  | 109 {% endblock %} | 
| OLD | NEW | 
|---|