Skip to content

Nodejs module to draw the grid/backbone of any website

License

Notifications You must be signed in to change notification settings

amirhouieh/grid-reveal

Repository files navigation

#Web Grider A nodejs package which draw the grid behind webpages

Use

import { GridReveal } from "grid-reveal";
const g = new GridReveal();
await g.init();
const {originalBase64, gridBase64} = await g.renderPage("ENCODED_URL", opts);

Options

interface Viewport {
    //he page width in pixels.
    width: number;
     //The page height in pixels.
    height: number;
}

interface TGridRevealRenderOptions{
    /*Int value, if presents, elements with less text length will be ignored*/
    textLength?: number|null,

    /*float value 0-1, if present the more the bigger blocks (less details)*/
    sizeThreshold?: number|null,
}

type TGridRevealRenderPageOptions = {
    viewPort?: Viewport,
    renderOptions?: TGridRevealRenderOptions
}

Examples

youtube-homepage youtube-homepage

development

About

Nodejs module to draw the grid/backbone of any website

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published