Skip to content

Commit

Permalink
Use https in links and images
Browse files Browse the repository at this point in the history
Also fixes #27 by changing the URL in the markdown code to the canonical CRAN package URL.
  • Loading branch information
dirkschumacher committed Mar 14, 2018
1 parent dc69d30 commit 52f8bbb
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
<script>
function update1() {
var pkg = document.getElementById("package").value;
var url = "http://cranlogs.r-pkg.org/badges/" + pkg;
var md = "[![](http://cranlogs.r-pkg.org/badges/" +
pkg + ")](http://cran.rstudio.com/web/packages/" +
pkg + "/index.html)";
var url = "https://cranlogs.r-pkg.org/badges/" + pkg;
var md = "[![](https://cranlogs.r-pkg.org/badges/" +
pkg + ")](https://cran.r-project.org/package=" + pkg + ")";
document.getElementById("url").value = url;
document.getElementById("markdown").value = md;
}
Expand All @@ -33,7 +32,7 @@ <h1>CRAN download counts</h1>

<p>
API for CRAN package download counts, from the
<a href="http://cran-logs.rstudio.com/">RStudio CRAN mirror</a>.
<a href="https://cran-logs.rstudio.com/">RStudio CRAN mirror</a>.
</p>

<hr>
Expand All @@ -42,21 +41,21 @@ <h3>Badges</h3>

<p>Add a badge with download counts to your homepage or your
Github project page. Our badges were generated by
<a href="http://shields.io/">shields.io</a>.
<a href="https://shields.io/">shields.io</a>.

<p>
<form>
<label>Example</label>
<img class="badge" src="http://cranlogs.r-pkg.org/badges/ggplot2">
<img class="badge" src="https://cranlogs.r-pkg.org/badges/ggplot2">
<label for="package">R Package</label>
<input class="u-full-width" type="text" value="ggplot2" id="package"
onkeydown="update()">
<label for="url">URL</label>
<input class="u-full-width" type="text" readonly="readonly"
value="http://cranlogs.r-pkg.org/badges/ggplot2" id="url">
value="https://cranlogs.r-pkg.org/badges/ggplot2" id="url">
<label for="markdown">MarkDown</label>
<textarea class="u-full-width" id="markdown" readonly="readonly">
[![](http://cranlogs.r-pkg.org/badges/ggplot2)](http://cran.rstudio.com/web/packages/ggplot2/index.html)
[![](https://cranlogs.r-pkg.org/badges/ggplot2)](https://cran.rstudio.com/web/packages/ggplot2/index.html)
</textarea>
</form>

Expand Down Expand Up @@ -104,7 +103,7 @@ <h3>JSON API</h3>

<p>
The server provides a JSON API throught HTTP as well:
<pre><code>$ curl http://cranlogs.r-pkg.org/downloads/total/last-week/ggplot2
<pre><code>$ curl https://cranlogs.r-pkg.org/downloads/total/last-week/ggplot2
<span class="output">
[
{
Expand Down

0 comments on commit 52f8bbb

Please sign in to comment.