Added Open "Source Code" link in a new tab #476

This just makes the links to the source code and Chart.js open in a new
tab. The `rel="noopener noreferrer"` has been added to prevent security
issues in older browsers. This is just an ease of use change that
doesn't affect any of the core speedtest functionality in any way.

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
Matthew Nickson 2022-03-30 19:00:35 +01:00
parent 2f19331378
commit e5496fcf90
No known key found for this signature in database
GPG key ID: BF229DCFD4748E05
11 changed files with 11 additions and 11 deletions

View file

@ -428,7 +428,7 @@ function initUI(){
<img src="" id="resultsImg" />
</div>
</div>
<a href="https://github.com/librespeed/speedtest">Source code</a>
<a href="https://github.com/librespeed/speedtest" target="_blank" rel="noopener noreferrer">Source code</a>
</div>
<div id="privacyPolicy" style="display:none">
<h2>Privacy Policy</h2>

View file

@ -320,7 +320,7 @@ function initUI(){
<img src="" id="resultsImg" />
</div>
</div>
<a href="https://github.com/librespeed/speedtest">Source code</a>
<a href="https://github.com/librespeed/speedtest" target="_blank" rel="noopener noreferrer">Source code</a>
</div>
<div id="privacyPolicy" style="display:none">
<h2>Privacy Policy</h2>

View file

@ -443,7 +443,7 @@ function initUI(){
<img src="" id="resultsImg" />
</div>
</div>
<a href="https://github.com/librespeed/speedtest">Source code</a>
<a href="https://github.com/librespeed/speedtest" target="_blank" rel="noopener noreferrer">Source code</a>
</div>
<div id="privacyPolicy" style="display:none">
<h2>Privacy Policy</h2>

View file

@ -236,7 +236,7 @@ function I(id){return document.getElementById(id);}
IP Address: <span id="ip"></span>
</div>
</div>
<a href="https://github.com/librespeed/speedtest">Source code</a>
<a href="https://github.com/librespeed/speedtest" target="_blank" rel="noopener noreferrer">Source code</a>
<script type="text/javascript">
initUI();
loadServers();

View file

@ -32,7 +32,7 @@
s.start(); // start the speedtest with default settings
</script>
<a href="https://github.com/librespeed/speedtest">Source code</a>
<a href="https://github.com/librespeed/speedtest" target="_blank" rel="noopener noreferrer">Source code</a>
</body>
</html>

View file

@ -251,6 +251,6 @@
<a href="javascript:abortTest()" id="abortBtn">Abort</a>
</div>
<a href="javascript:runTest()" id="startBtn">Run speedtest</a>
<br/><br/> Charts by <a href="http://www.chartjs.org/">Chart.js</a><br/><br/><a href="https://github.com/librespeed/speedtest">Source code</a>
<br/><br/> Charts by <a href="http://www.chartjs.org/" target="_blank" rel="noopener noreferrer">Chart.js</a><br/><br/><a href="https://github.com/librespeed/speedtest" target="_blank" rel="noopener noreferrer">Source code</a>
</body>
</html>

View file

@ -166,7 +166,7 @@ function I(id){return document.getElementById(id);}
</div>
</div>
</div>
<a href="https://github.com/librespeed/speedtest">Source code</a>
<a href="https://github.com/librespeed/speedtest" target="_blank" rel="noopener noreferrer">Source code</a>
<script type="text/javascript">
initUI();
</script>

View file

@ -317,7 +317,7 @@ function initUI(){
<img src="" id="resultsImg" />
</div>
</div>
<a href="https://github.com/librespeed/speedtest">Source code</a>
<a href="https://github.com/librespeed/speedtest" target="_blank" rel="noopener noreferrer">Source code</a>
</div>
<div id="privacyPolicy" style="display:none">
<h2>Privacy Policy</h2>

View file

@ -255,7 +255,7 @@ function initUI(){
<span id="ip"></span>
</div>
</div>
<a href="https://github.com/librespeed/speedtest">Source code</a>
<a href="https://github.com/librespeed/speedtest" target="_blank" rel="noopener noreferrer">Source code</a>
</div>
<script type="text/javascript">setTimeout(function(){initUI()},100);</script>
</body>

View file

@ -184,7 +184,7 @@ function I(id){return document.getElementById(id);}
IP Address: <span id="ip"></span>
</div>
</div>
<a href="https://github.com/librespeed/speedtest">Source code</a>
<a href="https://github.com/librespeed/speedtest" target="_blank" rel="noopener noreferrer">Source code</a>
<script type="text/javascript">
initUI();
</script>

View file

@ -204,7 +204,7 @@ function I(id){return document.getElementById(id);}
IP Address: <span id="ip"></span>
</div>
</div>
<a href="https://github.com/librespeed/speedtest">Source code</a>
<a href="https://github.com/librespeed/speedtest" target="_blank" rel="noopener noreferrer">Source code</a>
<script type="text/javascript">
initUI();
</script>