0.3.8 • Published 9 years ago

gardr-plugin-host-remove v0.3.8

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

Gardr Iframe Remove Plugin

Gardr plugin to remove iframes from host based on certain conditions.

Install

npm install gardr-plugin-host-remove --save

Bundle

In your host bundle file:

    var gardrHost = require('gardr-host');
    var remove = require('gardr-plugin-host-remove');

    gardrHost.plugin(remove);

    module.exports = gardrHost;

Options

removeOnTimeout - number, amount of miliseconds after which iframe will be removed if it doesn't respond to host.

removeOnFailure - boolean, indicating wether iframe should be removed if it fails to render.

removeBySize - object containing size threshold which if not met will result in iframe removal. Syntax:

removeBySize: {
    minWidth: number,
    minHeight: number
}

removeCallback - function that will be called if item was removed. Recieves item as a parameter.

removeCheckDelay - number, amount of miliseconds after which check will be performed (default: 0). Requires Send Size Plugin

Example

var gardr = gardrHost(...);
gardr.queue('ad', {
    removeOnTimeout: true,
    removeOnFailure: true,
    removeBySize: {
        minWidth: 1,
        minHeight: 1
    }
});
0.3.8

9 years ago

0.3.7

10 years ago

0.3.6

10 years ago

0.3.5

10 years ago

0.3.4

10 years ago

0.3.3

10 years ago

0.3.2

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago