From e92fd5a49fcb22444fe65c7edd1b576e431c7331 Mon Sep 17 00:00:00 2001 From: Kalan Chen Date: Mon, 14 May 2018 17:01:12 +0800 Subject: [PATCH] only display link when 17live repo --- netlify/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/netlify/app.js b/netlify/app.js index 5a1c6de..8935014 100644 --- a/netlify/app.js +++ b/netlify/app.js @@ -1,10 +1,12 @@ (function() { let curPathname; + const paths = window.location.href.split('/'); + const is17LiveRepo = paths.includes('17live') && paths.includes('17media'); injectPreviewNetlify(); function injectPreviewNetlify() { - if (window.location.pathname === curPathname) { + if (window.location.pathname === curPathname || !is17LiveRepo) { return; }