Ticket #22047: 0001-Remove-the-data-original-title-attribute.patch

File 0001-Remove-the-data-original-title-attribute.patch, 15.4 KB (added by cypherpunks, 3 years ago)
  • templates/details/bridge.html

    From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
    From: cypherpunks <cypherpunks@torproject.org>
    Date: Sun, 23 Apr 2017 19:38:05 +0000
    Subject: [PATCH] Remove the data-original-title attribute
    
    The Bootstrap Tooltip plugin overwrites the data-original-title
    attribute when the title attribute is specified. All of the elements
    that specify the data-original-title attribute also specify the title
    attribute which makes the former serve no purpose.
    
    Also the title attribute has been standardized while the
    data-original-title attribute is not.
    
    Closes #22047.
    ---
     templates/details/bridge.html | 24 +++++++++++-----------
     templates/details/router.html | 46 +++++++++++++++++++++----------------------
     2 files changed, 35 insertions(+), 35 deletions(-)
    
    diff --git a/templates/details/bridge.html b/templates/details/bridge.html
    index dae5a6b..fda73f6 100644
    a b  
    1414    <div class="span6">
    1515    <h3>Configuration</h3>
    1616    <dl>
    17       <dt><span class="tip" title="This is the nickname that the Tor bridge operator chose." data-original-title="Nickname">Nickname</span></dt>
     17      <dt><span class="tip" title="This is the nickname that the Tor bridge operator chose.">Nickname</span></dt>
    1818      <dd><%= _.escape(relay.get('nickname')) %></dd>
    1919
    20       <dt><span class="tip" title="Ports (addresses are hidden) where the bridge listens for incoming connections from clients and other relays." data-original-title="Onion-routing addresses">OR Addresses</span></dt>
     20      <dt><span class="tip" title="Ports (addresses are hidden) where the bridge listens for incoming connections from clients and other relays.">OR Addresses</span></dt>
    2121      <dd><%= relay.get('or_addresses') %></dd>
    2222
    2323      <dt>
    24       <span class="tip" title="Bandwidth that the bridge is willing and able to provide in bytes per second." data-original-title="Advertised bandwidth">Advertised Bandwidth</span>
     24      <span class="tip" title="Bandwidth that the bridge is willing and able to provide in bytes per second.">Advertised Bandwidth</span>
    2525      </dt>
    2626      <dd><%= relay.get('bandwidth_hr') ? relay.get('bandwidth_hr') : 'not defined' %></dd>
    2727    </dl>
     
    3636    <% } %>
    3737    <dl>
    3838
    39     <dt><span class="tip" title="Hash of 20-byte unique identifier of the bridge." data-original-title="Hashed Fingerprint">Hashed Fingerprint</span></dt>
     39    <dt><span class="tip" title="Hash of 20-byte unique identifier of the bridge.">Hashed Fingerprint</span></dt>
    4040    <dd><pre><%= relay.get('fingerprint') %></pre></dd>
    4141
    4242    <% if (relay.get('running') === true) { %>
    43     <dt><span class="tip" title="The time since this bridge is online." data-original-title="Uptime">Uptime</span></dt>
     43    <dt><span class="tip" title="The time since this bridge is online.">Uptime</span></dt>
    4444    <dd><%= relay.get('uptime_hrfull') %></dd>
    4545    <% } else { %>
    46     <dt><span class="tip" title="The time since this bridge was last seen online." data-original-title="Downtime">Downtime</span></dt>
     46    <dt><span class="tip" title="The time since this bridge was last seen online.">Downtime</span></dt>
    4747    <dd><%= relay.get('downtime') %></dd>
    48     <dt><span class="tip" title="Timestamp when the bridge was last seen in the consensus." data-original-title="Last seen">Last Seen</span></dt>
     48    <dt><span class="tip" title="Timestamp when the bridge was last seen in the consensus.">Last Seen</span></dt>
    4949    <dd><%= relay.get('last_seen') %></dd>
    5050    <% } %>
    5151
    52     <dt><span class="tip" title="Flags that the directory authorities assigned to this bridge." data-original-title="Bridge flags">Flags</span></dt>
     52    <dt><span class="tip" title="Flags that the directory authorities assigned to this bridge.">Flags</span></dt>
    5353    <dd><% _.each(relay.get('flags'), function(flag) { %>
    5454    <span class="tip flags" title="<%= flag[2] %>">
    5555        <img class="inline" alt="" src="img/flags/<%= flag[1] %>.png"/>
     
    5858    <% }); %>
    5959    </dd>
    6060   
    61     <dt><span class="tip" title="" data-original-title="Properties">Properties</span></dt>
     61    <dt>Properties</dt>
    6262    <dd>
    6363    <% var propertyCount = 0; %>
    6464    <% if (relay.get('recommended_version') === false) {
     
    7272    <%=propertyCount==0?'none':''%>
    7373    </dd>
    7474
    75     <dt><span class="tip" title="Date and time when the bridge was last (re-)started." data-original-title="Last restarted">Last Restarted</span></dt>
     75    <dt><span class="tip" title="Date and time when the bridge was last (re-)started.">Last Restarted</span></dt>
    7676    <dd><%= relay.get('last_restarted') %></dd>
    7777
    78     <dt><span class="tip" title="What OS and Tor version the bridge is using" data-original-title="Platform">Platform</span></dt>
     78    <dt><span class="tip" title="What OS and Tor version the bridge is using">Platform</span></dt>
    7979    <dd><%= _.escape(relay.get('platform')) %></dd>
    8080
    81     <dt><span class="tip" title="Transport protocols supported by this bridge." data-original-title="Transport protocols">Transport protocols</span></dt>
     81    <dt><span class="tip" title="Transport protocols supported by this bridge.">Transport protocols</span></dt>
    8282    <dd><%= relay.get('transports') ? relay.get('transports') : 'none' %></dd>
    8383
    8484    </dl>
  • templates/details/router.html

    diff --git a/templates/details/router.html b/templates/details/router.html
    index 5ffec67..430091b 100644
    a b  
    1414    <div class="span6">
    1515    <h3>Configuration</h3>
    1616    <dl>
    17       <dt><span class="tip" title="This is the nickname that the Tor relay operator chose." data-original-title="Nickname">Nickname</span></dt>
     17      <dt><span class="tip" title="This is the nickname that the Tor relay operator chose.">Nickname</span></dt>
    1818      <dd><%= _.escape(relay.get('nickname')) %></dd>
    1919
    20       <dt><span class="tip" title="Addresses and ports where the relay listens for incoming connections from clients and other relays." data-original-title="Onion-routing addresses">OR Addresses</span></dt>
     20      <dt><span class="tip" title="Addresses and ports where the relay listens for incoming connections from clients and other relays.">OR Addresses</span></dt>
    2121      <dd><%= relay.get('or_addresses') %></dd>
    2222
    23       <dt><span class="tip" title="These are the contact details of the Tor relay operator" data-original-title="ContactInfo">Contact</span></dt>
     23      <dt><span class="tip" title="These are the contact details of the Tor relay operator">Contact</span></dt>
    2424      <dd><%= _.escape( relay.get('contact')!='undefined' ? relay.get('contact') : 'none' ) %></dd>
    2525
    26       <dt><span class="tip" title="Address and port where the relay listens for directory requests." data-original-title="Directory port">Dir Address</span></dt>
     26      <dt><span class="tip" title="Address and port where the relay listens for directory requests.">Dir Address</span></dt>
    2727      <dd><%= relay.get('dir_address') ? relay.get('dir_address') : 'none' %></dd>
    2828
    2929      <dt>
    30       <span class="tip" title="Bandwidth that the relay is willing and able to provide in bytes per second." data-original-title="Advertised bandwidth">Advertised Bandwidth</span>
     30      <span class="tip" title="Bandwidth that the relay is willing and able to provide in bytes per second.">Advertised Bandwidth</span>
    3131      </dt>
    32       <dd><span class="tip" title="Bandwidth rate: <%= relay.get('bandwidthr') %><br>Bandwidth burst: <%= relay.get('bandwidthb') %><br>Observed bandwidth: <%= relay.get('obandwidth') %>" data-original-title="Bandwidth values"><%= relay.get('bandwidth_hr') %></span></dd>
    33       <dt><span class="tip" title="Port summary of IPv4 exit connections that the relay is going to accept or reject." data-original-title="IPv4 exit policy summary">IPv4 Exit Policy Summary</span></dt>
     32      <dd><span class="tip" title="Bandwidth rate: <%= relay.get('bandwidthr') %><br>Bandwidth burst: <%= relay.get('bandwidthb') %><br>Observed bandwidth: <%= relay.get('obandwidth') %>"><%= relay.get('bandwidth_hr') %></span></dd>
     33      <dt><span class="tip" title="Port summary of IPv4 exit connections that the relay is going to accept or reject.">IPv4 Exit Policy Summary</span></dt>
    3434      <dd>
    3535      <% if ('accept' in relay.get('exit_policy_summary')) { %>
    3636        <pre class="pre-scrollable">accept<% _.each(relay.get('exit_policy_summary')['accept'],
     
    3939        <pre class="pre-scrollable">reject<% _.each(relay.get('exit_policy_summary')['reject'],
    4040          function(ports) { %><br>  <%= $.trim(ports) %><% });} %></pre>
    4141      </dd>
    42       <dt><span class="tip" title="Port summary of IPv6 exit connections that the relay is going to accept or reject." data-original-title="IPv6 exit policy summary">IPv6 Exit Policy Summary</span></dt>
     42      <dt><span class="tip" title="Port summary of IPv6 exit connections that the relay is going to accept or reject.">IPv6 Exit Policy Summary</span></dt>
    4343      <dd>
    4444      <% if (relay.get('exit_policy_v6_summary') && ('accept' in relay.get('exit_policy_v6_summary'))) { %>
    4545        <pre class="pre-scrollable">accept<% _.each(relay.get('exit_policy_v6_summary')['accept'],
     
    5151        <pre class="pre-scrollable">reject<br>  1-65535</pre>
    5252      <% } %>
    5353      </dd>
    54       <dt><span class="tip" title="Policy of exit connections that the relay is going to accept or reject." data-original-title="Exit policy">Exit Policy</span></dt>
     54      <dt><span class="tip" title="Policy of exit connections that the relay is going to accept or reject.">Exit Policy</span></dt>
    5555      <dd>
    5656      <pre class="pre-scrollable"><% _.each(relay.get('exit_policy'), function(line) { %>
    5757<%= $.trim(line) %><% }); %></pre>
     
    6868    <% } %>
    6969    <dl>
    7070
    71     <dt><span class="tip" title="20-byte unique identifier of the relay." data-original-title="Fingerprint">Fingerprint</span></dt>
     71    <dt><span class="tip" title="20-byte unique identifier of the relay.">Fingerprint</span></dt>
    7272    <dd><pre><%= relay.get('fingerprint') %></pre></dd>
    7373
    7474    <% if (relay.get('running') === true) { %>
    75     <dt><span class="tip" title="The time since this relay is online." data-original-title="Uptime">Uptime</span></dt>
     75    <dt><span class="tip" title="The time since this relay is online.">Uptime</span></dt>
    7676    <dd><%= relay.get('uptime_hrfull') %></dd>
    7777    <% } else { %>
    78     <dt><span class="tip" title="The time since this relay was last seen online." data-original-title="Downtime">Downtime</span></dt>
     78    <dt><span class="tip" title="The time since this relay was last seen online.">Downtime</span></dt>
    7979    <dd><%= relay.get('downtime') %></dd>
    80     <dt><span class="tip" title="Timestamp when the relay was last seen in the consensus." data-original-title="Last seen">Last Seen</span></dt>
     80    <dt><span class="tip" title="Timestamp when the relay was last seen in the consensus.">Last Seen</span></dt>
    8181    <dd><%= relay.get('last_seen') %></dd>
    8282    <% } %>
    8383
    84     <dt><span class="tip" title="Flags that the directory authorities assigned to this relay." data-original-title="Relay flags">Flags</span></dt>
     84    <dt><span class="tip" title="Flags that the directory authorities assigned to this relay.">Flags</span></dt>
    8585    <dd><% _.each(relay.get('flags'), function(flag) { %>
    8686        <span class="tip flags" title="<%= flag[2] %>">
    8787            <img class="inline" alt="" src="img/flags/<%= flag[1] %>.png"/>
     
    9090    <% }); %>
    9191    </dd>
    9292   
    93     <dt><span class="tip" title="" data-original-title="Properties">Properties</span></dt>
     93    <dt>Properties</dt>
    9494    <dd>
    9595    <% var propertyCount = 0; %>
    9696    <% if (relay.get('recommended_version') === false) {
     
    104104    <%=propertyCount==0?'none':''%>
    105105    </dd>
    106106
    107     <dt><span class="tip" title="Country as found in a GeoIP database by resolving the relay's first onion-routing address." data-original-title="Country">Country</span></dt>
     107    <dt><span class="tip" title="Country as found in a GeoIP database by resolving the relay's first onion-routing address.">Country</span></dt>
    108108    <dd><% if (relay.get('country')) { %><img class="inline country" title="<%= relay.get('countryname') %>" alt="" src="img/cc/<%= relay.get('country') %>.png"/> <%= relay.get('countryname') %><% } else { %>Unknown<% } %></dd>
    109109
    110     <dt><span class="tip" title="Autonomous System Number" data-original-title="AS Number">AS Number</span></dt>
     110    <dt><span class="tip" title="Autonomous System Number">AS Number</span></dt>
    111111    <dd><%= relay.get('as_no') ? _.escape(relay.get('as_no')) : "unknown" %></dd>
    112112
    113     <dt><span class="tip" title="Autonomous System Name" data-original-title="AS Name">AS Name</span></dt>
     113    <dt><span class="tip" title="Autonomous System Name">AS Name</span></dt>
    114114    <dd><%= relay.get('as_name') ? _.escape(relay.get('as_name')) : "unknown" %></dd>
    115115
    116     <dt><span class="tip" title="Date and time when the relay was last (re-)started." data-original-title="Last restarted">Last Restarted</span></dt>
     116    <dt><span class="tip" title="Date and time when the relay was last (re-)started.">Last Restarted</span></dt>
    117117    <dd><%= relay.get('last_restarted') %></dd>
    118118
    119     <dt><span class="tip" title="Relays that are part of this relay's family and consider this relay to be part of their family." data-original-title="Effective Family Members">Effective Family Members</span></dt>
     119    <dt><span class="tip" title="Relays that are part of this relay's family and consider this relay to be part of their family.">Effective Family Members</span></dt>
    120120    <dd>
    121121        <pre><% if (relay.get('effective_family') !== null) { %><% _.each(relay.get('effective_family'), function(member) { %><% var valid = member.match(RegExp("^\$[A-F0-9]{40}$")); %>
    122122<% if (valid) { %><a href="#details/<%= member.replace('$', '') %>" title="Effective family member"><% } %><%= member %><% if (valid) { %></a><% }}); %>
    123123<% } else { %>none<% } %></pre>
    124124    </dd>
    125     <dt><span class="tip" title="Relays that are part of this relay's family but don't consider this relay to be part of their family." data-original-title="Alleged Members">Alleged Family Members</span></dt>
     125    <dt><span class="tip" title="Relays that are part of this relay's family but don't consider this relay to be part of their family.">Alleged Family Members</span></dt>
    126126    <dd>
    127127        <pre><% if (relay.get('alleged_family') !== null) { %><% _.each(relay.get('alleged_family'), function(member) { %><% var valid = member.match(RegExp("^\$[A-F0-9]{40}$")); %>
    128128<% if (valid) { %><a href="#details/<%= member.replace('$', '') %>" title="Alleged family member" class="alleged"><% } %><%= member %><% if (valid) { %></a><% }}); %>
    129129<% } else { %>none<% } %></pre>
    130130    </dd>
    131131
    132     <dt><span class="tip" title="What OS and Tor version the relay is using" data-original-title="Platform">Platform</span></dt>
     132    <dt><span class="tip" title="What OS and Tor version the relay is using">Platform</span></dt>
    133133    <dd><%= _.escape(relay.get('platform')) %></dd>
    134134
    135     <dt><span class="tip" title="Weight assigned to this relay by the directory authorities that clients use in their path selection algorithm. The unit is arbitrary; currently it's kilobytes per second, but that might change in the future." data-original-title="Consensus Weight">Consensus Weight</span></dt>
     135    <dt><span class="tip" title="Weight assigned to this relay by the directory authorities that clients use in their path selection algorithm. The unit is arbitrary; currently it's kilobytes per second, but that might change in the future.">Consensus Weight</span></dt>
    136136    <dd><%= relay.get('consensus_weight') %></dd>
    137137
    138138    </dl>