Installation

Install the rev-utils library to augment your Electron setup with full compatibility for ads. We may occassionally update the package.

npm i -D rev-utils@https://r2.reviq.app/rev-utils-v1.0.3.tgz

Usage

After creating window with new BrowserWindow, pass in the window and electron global into setupRevUtils

main.js
const { setupRevUtils } = require("rev-utils");

// Note the import of the global electron here!
const electron = require("electron"); 
// You can destructure your imports from this module object
const { BrowserWindow } = electron;

const myWindow = new BrowserWindow();

setupRevUtils(myWindow, electron);

Under the hood, setupRevUtils calls two functions on the window

  • setupLinkHandler to open ads (and block malicious behavior!)
  • setUserAgent, which removes non-standard portions of the User Agent string which may trigger IVT (invalid traffic).