From 34760a18da8b30dd76c6c6f075654b3e56b4850f Mon Sep 17 00:00:00 2001 From: Taka Date: Sat, 25 Aug 2018 08:29:18 +0000 Subject: [PATCH] Don't show the license if viewing the help via Github. --- vasl_templates/webapp/static/help/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vasl_templates/webapp/static/help/main.js b/vasl_templates/webapp/static/help/main.js index 9ddef6a..3ee7538 100644 --- a/vasl_templates/webapp/static/help/main.js +++ b/vasl_templates/webapp/static/help/main.js @@ -41,7 +41,8 @@ $(document).ready( function() { } ) ; // load the license - if ( window.parent.location.protocol !== "file:" ) { + var is_github = ( window.parent.location.hostname === "github.com" || window.parent.location.hostname === "rawgit.com" ) ; + if ( window.parent.location.protocol !== "file:" && !is_github ) { var url = window.parent.location.protocol + "//" + window.parent.location.hostname ; if ( window.parent.location.port ) url += ":" + window.parent.location.port ;