Skip to content

Commit

Permalink
make samples docs go to README for now
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed May 3, 2015
1 parent e60143d commit c256c8c
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions docs/js/samples.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,26 @@ requirejs([

var search = parseSearchString(window.location.search);
if (search.repo && search.owner) {
if (search.type === "docs") {
window.location.href = "http://github.com/" + search.owner + "/" + search.repo + "/blob/master/README.md";
} else {

setButtonTarget("github", "http://github.com/" + search.owner + "/" + search.repo);
setButtonTarget("files", "http://github.com/" + search.owner + "/" + search.repo + "/releases/latest");
setButtonTarget("github", "http://github.com/" + search.owner + "/" + search.repo);
setButtonTarget("files", "http://github.com/" + search.owner + "/" + search.repo + "/releases/latest");

var url = "https://api.github.com/repos/" + search.owner + "/" + search.repo + "/releases/latest";
console.log(url);
if (isLocal) {
downloadLatest(null, JSON.stringify({
assets: [
{
browser_download_url: "https://foo.com/foo.bar.unitypackage",
},
],
}));
} else {
io.get(url, "", downloadLatest);
var url = "https://api.github.com/repos/" + search.owner + "/" + search.repo + "/releases/latest";
console.log(url);
if (isLocal) {
downloadLatest(null, JSON.stringify({
assets: [
{
browser_download_url: "https://foo.com/foo.bar.unitypackage",
},
],
}));
} else {
io.get(url, "", downloadLatest);
}
}
}

Expand Down

0 comments on commit c256c8c

Please sign in to comment.