Skip to content

Commit

Permalink
update links
Browse files Browse the repository at this point in the history
  • Loading branch information
williamngan committed Aug 19, 2017
1 parent 4e458e9 commit 8640815
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 7 deletions.
17 changes: 14 additions & 3 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@

var link = document.createElement("a");
link.setAttribute("class", "source-code");
link.setAttribute("href", "https://github.com/williamngan/pt/blob/master/demo/" + qfile +".js");
link.setAttribute("target", "_blank");
link.textContent = "view code";
link.setAttribute("href", "https://github.com/williamngan/pts/blob/master/demo/" + qfile +".js");
link.setAttribute("target", "pts_github");
link.textContent = "source code";

src.onload = function () {
var hint = document.querySelector("#hint");
Expand Down Expand Up @@ -144,6 +144,17 @@ <h1><strong>Demo</strong><span id="description"></span></h1>

</script>

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-104913373-1', 'auto');
ga('send', 'pageview');

</script>


</body>
</html>
2 changes: 1 addition & 1 deletion docs/assets/js/main.js

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,5 +224,15 @@ <h2>Legend</h2>
<div class="overlay"></div>
<script src="assets/js/main.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="assets/js/search.js"><' + '/script>');</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-104913373-1', 'auto');
ga('send', 'pageview');

</script>
</body>
</html>
10 changes: 10 additions & 0 deletions guide/assets/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@
<script src="./js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-104913373-1', 'auto');
ga('send', 'pageview');

</script>
6 changes: 3 additions & 3 deletions guide/js/guide.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Pts.namespace( this );

(function() {

var sourceCodePath = "./js/examples/";
var sourceCodePath = "https://github.com/williamngan/pts/blob/master/guide/js/examples/";

var blocks = Array.from( document.querySelectorAll("img") ).filter( (f) => {
var t = f.getAttribute("alt");
Expand All @@ -24,9 +24,9 @@ Pts.namespace( this );
var divID = imgElem.getAttribute("alt").replace(/js\:/gi, "");

var link = document.createElement("a");
link.textContent = "source code";
link.textContent = "source code";
link.classList.add("sourceCodeLink");
// link.setAttribute( "target", "_blank");
link.setAttribute( "target", "pts_github");
link.setAttribute( "href", sourceCodePath+divID+".js");
div.appendChild( link );

Expand Down
10 changes: 10 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@

<script type="text/javascript" src="./assets/cover.js"></script>

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-104913373-1', 'auto');
ga('send', 'pageview');

</script>

</body>
</html>
11 changes: 11 additions & 0 deletions study/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,17 @@ <h1><strong>Studies</strong> try out various pts.js features. No polish.</h1>

</script>

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-104913373-1', 'auto');
ga('send', 'pageview');

</script>


</body>
</html>

0 comments on commit 8640815

Please sign in to comment.