Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-wakelock
Advanced tools
Readme
This is an invisible React component that tries to keep the browser/client awake - especially for mobile devices.
npm i --save react-wakelock
import WakeLock from 'react-wakelock';
render() {
return (
<div>
...
<WakeLock />
...
</div>
);
}
Just add the component to your application. By default it is immediately "enabled".
WARNING: Due to browser limitations the wake-lock is not effective until the user first clicks/touches somewhere in the document. So, after adding/enabling the component, it will not prevent sleep until the user interacts with the page in some way (scrolling not being an interaction).
This limitation does not apply to iOS devices.
The component uses two methods, depending on the operating system.
On Android, a invisible dummy-video is played in the background.
On iOS, an (hopefully unnoticeable) dummy navigation is performed every 15 seconds.
preventSleep
- (true
by default). You can use this property to control the
component behavior. Sleep is prevented only in preventSleep===true
state.The component is based on NoSleep.js by Rich Tibbett. However, it is implemented differently and also uses different dummy videos that do not unnecessarily use CPU power.
This project is licensed under the terms of the MIT license
FAQs
a React component that keeps the browser/smartphone awake (aka. "no sleep")
The npm package react-wakelock receives a total of 8 weekly downloads. As such, react-wakelock popularity was classified as not popular.
We found that react-wakelock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.