[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #15820 [Tor Check]: 'Check' site should have the YES/NO answer in the title + 2 other improvement suggestions



#15820: 'Check' site should have the YES/NO answer in the title + 2 other
improvement suggestions
-----------------------------+---------------------
     Reporter:  yurivict271  |      Owner:  arlolra
         Type:  enhancement  |     Status:  closed
     Priority:  normal       |  Milestone:
    Component:  Tor Check    |    Version:
   Resolution:  implemented  |   Keywords:
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+---------------------

Comment (by yurivict271):

 No, this isn't much.
 Html only gets these lines:
 {{{
   <script src="jquery.js"></script>
   <script src="reload.js"></script>
   <script>$(document).ready(function() {reloadAfterTimeout(60)})</script>
 }}}

 And separate reload.js might look like this:
 {{{
   function reloadAfterTimeout(cnt) {
     setTimeout(function() {
       $.ajax({
         url: "recheck_tor",
         context: document.body,
         success: function(json) {
           // update document with the current TOR status
           $('#yesNoText').innerHTML = json[0] ? "You are using TOR" : "You
 are not using TOR"
           document.title = json[0] ? "You are using TOR" : "You are not
 using TOR"
           $('#favicon_link')[0].href = json[0] ? 'favicon-success.ico' :
 'favicon-not-tor.ico'
           // resubmit
           if (cnt > 0)
             reloadAfterTimeout(cnt-1)
         }
       })
     }, 60000)
   }
 }}}
 It will only be loaded when the user has JavaScript enabled.
 Json response will be one of these:
 {{{
 * [true]
 * [false]
 }}}

 The JavaScript use in itself in general isn't the security threat. Tor
 browser usually disables it just in case.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/15820#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs