Open History to see the last commit
1import { PRIMARY_PASTE_DISABLED_ARGUMENT } from "./preview/GuestProtocol.ts";
2import "./preview/PickPreload.ts";
3
4// Electron hands webPreferences.additionalArguments to sandboxed preloads in process.argv.
5if (process.argv.includes(PRIMARY_PASTE_DISABLED_ARGUMENT)) {
6 // Same guard as the app preload: Blink pastes PRIMARY on an uncancelled middle mouseup.
7 window.addEventListener(
8 "mouseup",
9 (event) => {
10 if (event.button === 1) event.preventDefault();
11 },
12 true,
13 );
14}