Skip to content

Commit

Permalink
Trac #30030: Prevent JSmol from phoning home
Browse files Browse the repository at this point in the history
The JSmol library -- invoked when using `viewer='jmol'` or
`viewer='canvas3d'` from the Jupyter notebook -- is sending an HTTP
request to a tracking script at chemapps.stolaf.edu that then uses
Google Analytics:

{{{
GET /jmol/JmolTracker.php?id=UA-45940799-1&applet=Jmol._Canvas2D%20(Jmol
)&version=2019-06-08%2000:17:46%20(JSmol/j2s)&appver=14.29.51&url=about%
3Asrcdoc HTTP/1.1
Host: chemapps.stolaf.edu
User-Agent: ...
...
Referer: http://localhost:8888/notebooks/.../mynotebook.ipynb
...
}}}

These requests are not essential to the functioning of JSmol, so in the
interest of furthering users' digital privacy, the proposed change
prevents such requests from occurring.

The instruction to disable the tracking request was found at:
https://sourceforge.net/p/jmol/mailman/message/31869453/

URL: https://trac.sagemath.org/30030
Reported by: gh-jcamp0x2a
Ticket author(s): Joshua Campbell
Reviewer(s): Paul Masson
  • Loading branch information
Release Manager committed Jul 8, 2020
2 parents 20ea231 + bdd7bf6 commit aa4e325
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/sage/repl/display/jsmol_iframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
</head>
<body>
<script type="text/javascript">
delete Jmol._tracker; // Prevent JSmol from phoning home.
var script = {script};
var Info = {{
width: '{width}',
Expand Down

0 comments on commit aa4e325

Please sign in to comment.