GithubHelp home page GithubHelp logo

yafa's People

Contributors

geoffwright avatar lukeinage avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

yafa's Issues

Blocked by uBlock Origin

The YAFA ads are being blocked on EG by uBlock Origin when used in Firefox, thanks to this addition: https://github.com/uBlockOrigin/uAssets/blob/10d0289b32549f1996df5983e518d5800e52c790/filters/filters.txt#L585

This is fixable using the MutationObserver class in JavaScript, but older versions of IE don't support it, and it also prevents people (like us!) from being able to edit styles via the element inspector, which could prove to be a pickle!

The basic code to do so looks something like this:

var observerOptions = {attributes: true, attributeFilter : ['style'], attributeOldValue: true}
    ,observer = (typeof MutationObserver !== 'undefined') ?
        new MutationObserver(function (mutations) {
            mutations.forEach(function (mutation) {
                if (mutation.attributeName == 'style') {
                    observer.disconnect();
                    mutation.target.setAttribute('style', mutation.oldValue);
                    observer.observe(mutation.target, observerOptions);
                }
            });
        }) : null
});
if (observer) {
    observer.observe(target, observerOptions);
}

support campaign priorities

Given 2 campaigns:

  • A with priority 10
  • B with priority 1

The HIGHEST priority will always show. This allows ops to traffic a 'fallback' house ad for when nothing else is booked without having to explicitly enable and disable campaigns.

How does this combine with #1 ?

  • A priority 10 weight 5
  • B priority 10 weight 10
  • C priority 5 weight 100

A and B will show with 1:2 probability ratio. C will never show until A and B are deactivated.

deploy

  • EG
  • USG
  • VG247
  • RPS
  • ModDB/IndieDB
  • Nlife/Pushsquare
  • Gamesindustry.biz
  • Metabomb

weighted rotation

Say 3 campaigns are trafficked to eg-net:

  • Monkey Ball weight 2
  • Trackmania weight 4
  • HItman weight 6

Each would appear with a probability of weight/sum(weights)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.