
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
github.com/mathdroid/react-vr-gaze-button
👀 Extension of ReactVR's
VrButton
. Gaze for {duration} ms to click the button!
npm i --save react-vr-gaze-button
Import to your file add pass it onClick
(function) and duration
(number, ms, defaults to 1000 ms) as props. Renders a children
function prop that receives 3 arguments, in this order: remainingTime
: Remaining time to gaze in ms, isGazed
: boolean that indicates whether the button is being gazed, and gazeTimestamp
: the timestamp of the latest onEnter event, null
if isGazed
is false
, and returns a component. You can also pass a render
prop with 1 argument, same as using children
.
You can pass any other props and it will be pased to the VrButton
instance.
import React from "react";
import { Text } from "react-vr";
import GazeButton from "react-vr-gaze-button";
class Example extends React.Component {
state = {
clicked: false
};
render() {
const { clicked } = this.state;
return (
<GazeButton
onClick={() => this.setState({ clicked: true })}
duration={2000}
>
{(remainingTime, isGazed, gazeTimestamp) => (
<Text>
{isGazed
? clicked
? "You have clicked me"
: `Gaze me for ${remainingTime} milliseconds`
: "I am a gaze button"}
</Text>
)}
</GazeButton>
);
}
}
MIT. See LICENSE
FAQs
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.