安装 Installation
安装rev-utils库,为您的 Electron 应用添加完整的广告支持。我们可能会不定期更新该包。 Install the rev-utils library to augment your Electron setup with full compatibility for ads. We may occassionally update the package.使用方法 Usage
使用new BrowserWindow创建新窗口后,将窗口对象和electron全局变量传入 setupRevUtils。
After creating window with new BrowserWindow, pass in the window and
electron global into setupRevUtils
main.js
setupRevUtils在底层调用了窗口的两个函数:
-setupLinkHandler:用于打开广告(同时拦截恶意行为!)
-setUserAgent:用于移除User Agent字符串中的非标准部分,这些非标准内容可能触发无效流量(IVT)检测。
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).