Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
novalagung committed Jun 3, 2020
1 parent 26683bd commit 3d3f25b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adjustment.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func postAdjustment() {

// ===== inject popup info banner if exists
infoBannerToFind := `</body>`
infoBannerReplacement := `<div class="banner-container" onclick="this.style.display = 'none';"><div><a target="_blank" href="https://www.udemy.com/course/praktis-belajar-docker-dan-kubernetes-untuk-pemula/"><img src="/images/banner.png?v=` + getVersion() + `"></a></div></div><script>var bannerCounter = parseInt(localStorage.getItem("banner-counter")); if (isNaN(bannerCounter)) { bannerCounter = 0; } var bannerEl = document.querySelector('.banner-container'); if (bannerCounter % 5 === 0 && bannerEl) { bannerEl.style.display = 'block'; } localStorage.setItem("banner-counter", String(bannerCounter + 1));</script>` + infoBannerToFind
infoBannerReplacement := `<div class="banner-container" onclick="this.style.display = 'none';"><div><a target="_blank" href="https://www.udemy.com/course/praktis-belajar-docker-dan-kubernetes-untuk-pemula/"><img src="/images/banner.png?v=` + getVersion() + `"></a></div></div><script>var bannerCounter = parseInt(localStorage.getItem("banner-counter")); if (isNaN(bannerCounter)) { bannerCounter = 0; } var bannerEl = document.querySelector('.banner-container'); if (bannerCounter % 5 === 1 && bannerEl) { bannerEl.style.display = 'block'; } localStorage.setItem("banner-counter", String(bannerCounter + 1));</script>` + infoBannerToFind
htmlString = strings.Replace(htmlString, infoBannerToFind, infoBannerReplacement, -1)

// ==== update file
Expand Down

0 comments on commit 3d3f25b

Please sign in to comment.