tweak ad rates
This commit is contained in:
@@ -167,7 +167,7 @@
|
||||
{{ else if eq .Other.AdType 7}}
|
||||
<iframe class="sponsors_banner" src="/ad/revenuehits" style="width:728px; height:90px; border:none; padding:0; overflow:hidden;" scrolling="no"></iframe>
|
||||
{{ else if eq .Other.AdType 8}}
|
||||
<a class="sponsors_banner" style="display: inline-block; width: 728px; height: 90px;" href="/brave">
|
||||
<a class="sponsors_banner" style="display: inline-block; width: 728px; height: 90px;" href="https://brave.com/pix009">
|
||||
<img src="/res/img/misc/brave-728x90.png" style="width: 100%; height: 100%" />
|
||||
</a>
|
||||
{{end}}
|
||||
|
@@ -29,12 +29,7 @@ func browserCompat(ua string) bool {
|
||||
return strings.Contains(ua, "MSIE") || strings.Contains(ua, "Trident/7.0")
|
||||
}
|
||||
|
||||
func adType() (i int) {
|
||||
// Intn returns a number up to n, but never n itself. So it get a random 0
|
||||
// or 1 we need to give it n=2. We can use this function to make other
|
||||
// splits like 1/3 1/4, etc
|
||||
i = rand.Intn(5)
|
||||
|
||||
func adType() int {
|
||||
const (
|
||||
aAds = 0
|
||||
amarulaElectronics = 1
|
||||
@@ -47,16 +42,18 @@ func adType() (i int) {
|
||||
brave = 8
|
||||
)
|
||||
|
||||
switch i {
|
||||
case 0, 1:
|
||||
// Intn returns a number up to n, but never n itself. So it get a random 0
|
||||
// or 1 we need to give it n=2. We can use this function to make other
|
||||
// splits like 1/3 1/4, etc
|
||||
switch i := rand.Intn(12); i {
|
||||
case 0, 1, 2, 3, 4:
|
||||
return amarulaSolutions
|
||||
|
||||
case 2:
|
||||
case 5, 6, 7, 8:
|
||||
return adMaven
|
||||
|
||||
case 3, 4:
|
||||
case 9, 10:
|
||||
return brave
|
||||
|
||||
case 11:
|
||||
return aAds
|
||||
default:
|
||||
panic(fmt.Errorf(
|
||||
"random number generator returned unrecognised number: %d", i),
|
||||
|
Reference in New Issue
Block a user