Remove clickadu banner

This commit is contained in:
2021-06-22 00:34:14 +02:00
parent 5318002541
commit b995368c34
2 changed files with 4 additions and 6 deletions

View File

@@ -29,7 +29,7 @@ func (wc *WebController) serveCampaignPartner(w http.ResponseWriter, r *http.Req
Name: "pd_campaign", Name: "pd_campaign",
Value: p.ByName("id"), Value: p.ByName("id"),
Path: "/", Path: "/",
Expires: time.Now().AddDate(0, 0, 2), Expires: time.Now().AddDate(0, 0, 7),
}) })
// Redirect the user to the home page // Redirect the user to the home page

View File

@@ -78,12 +78,10 @@ func (vd *viewerData) adType(files []pixelapi.ListFile) {
// Intn returns a number up to n, but never n itself. So to get a random 0 // Intn returns a number up to n, but never n itself. So to get a random 0
// or 1 we need to give it n=2. We can use this function to make other // or 1 we need to give it n=2. We can use this function to make other
// splits like 1/3 1/4, etc // splits like 1/3 1/4, etc
switch i := rand.Intn(8); i { switch i := rand.Intn(4); i {
case 0: // 12.5% case 0: // 25%
vd.AdBannerType = clickAduBanner
case 1, 2: // 25%
vd.AdBannerType = brave vd.AdBannerType = brave
case 3, 4, 5, 6, 7: // 62.5% case 1, 2, 3: // 75%
vd.AdBannerType = aAds vd.AdBannerType = aAds
default: default:
panic(fmt.Errorf("random number generator returned unrecognised number: %d", i)) panic(fmt.Errorf("random number generator returned unrecognised number: %d", i))