From 85fd27aafe03181102558485ddd606de3d132c8c Mon Sep 17 00:00:00 2001 From: YardWill Date: Tue, 25 Dec 2018 16:13:52 +0800 Subject: [PATCH] prevent exlcode-btn rerender when history back --- js/exlcode.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/exlcode.js b/js/exlcode.js index 20972e2..d15d688 100644 --- a/js/exlcode.js +++ b/js/exlcode.js @@ -8,7 +8,7 @@ function trackEvent(action) { } } -var desktopBtn = $('Edit with EXLcode'); +var desktopBtn = $('Edit with EXLcode'); function getDesktopRepoPageType() { if (!$(".repository-content").length) { @@ -27,7 +27,7 @@ function getDesktopRepoPageType() { } function isDesktopRepoPage() { - return getDesktopRepoPageType() != "" + return getDesktopRepoPageType() != "" && !document.getElementById('exlcode-btn') } function exlcodeOpenUrl() {