Skip to content

robertpakalns/node-enject

 
 

Repository files navigation

node-enject

Electron injector that intercepts Chromium's render widget window to fix a Chromium bug.
In Chromium versions past ~97 holding and dragging the cursor freezes any current websocket connection if running with the flag --disable-frame-rate-limit.

Supports x64, ia32 (x86), and arm64 architectures for Windows only.

Build locally

npm install
./build.ps1 # Build artifacts in /dist
npm pack

Usage

npm i node-enject
import enject from "node-enject"

const win = new BrowserWindow({ // from electron
    show: false
})

win.once("ready-to-show", () => {
    const handleBuffer = win.getNativeWindowHandle()
    let hwnd

    if (process.arch === "x64" || process.arch === "arm64") {
        hwnd = Number(handleBuffer.readBigUInt64LE(0))
    } else {
        hwnd = handleBuffer.readUInt32LE(0)
    }

    enject.startHook(hwnd)
    win.show()
})

Initially built for Juice Client. Community Server

About

Electron injector that intercepts WNDPROC to fix a Chromium bug

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 63.4%
  • JavaScript 20.7%
  • PowerShell 15.9%