Skip to content

Commit

Permalink
Create script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ftw-win authored Mar 6, 2024
1 parent 77108b0 commit 4bf899c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Choose branch based on query string
var query = window.location.search;
if (query) {
var branch = query.replace("?", "");
} else {
var branch = "master";
}

// Load readme content
$.ajax({
url: "https://rawgit.com/GoogleCloudPlatform/ai-on-gke/"+branch+"/readme.md",
dataType: 'text',
success: function(data) {

// Convert readme from markdown to html
var converter = new Markdown.Converter();

// Show html
$(".wrapper").html(converter.makeHtml(data));

}
});

0 comments on commit 4bf899c

Please sign in to comment.