
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
See the demo.
Download the source files from the build
directory, or use Bower.
$ bower install iostap
Initialize the module to start listening for tap events...
window.iostap.initialize();
Then you're good to go. You can listen for "iostap"
events on any old element. For example:
$("a.link").on("iostap", function(e) {
console.log(e.currentTarget);
})
You can pass options to the initialize
method or set
them later on.
window.iostap.set({
// Name of the event to be fired
eventName: "iostap",
// Class applied to every element in the tree on touch
activeClass: "__active",
// Mininum time for the element to be active, after the touch ends
minActiveMS: 50,
// options.Buffer area around the element that is still considered active
buffer: 20,
// Maximum distance travelled before the touch becomes inactive
maxDistance: Math.pow(window.innerHeight * window.innerWidth, 0.35),
// Allow default behaviour and event propagation for events of this type
allowDefault: function(e){
e.target.nodeName.match(/^(INPUT|TEXTAREA|SELECT)$/);
}
});
iostap
is a plugin designed to mimic the behaviour of tapping a button in the iOS ecosystem with a great degree of precision, affording developers who build hybrid web apps a greater user experience for their users. iostap
is a super-lightweight library, weighing in at about 1kb, and doesn't add unecessary overhead client-side.
Under the hood, there is more going on than you might think.
The library aims to acheive several goals in imitating the native iOS tap:
"iostap"
event.__active
pseudo pseudo::
class, so that you can control their appearance with CSS. For example: a.button.__active {...}
."iostap"
event is triggered regardless of whether the device is touch-enabled or not, so you can use it in any environment without extra configuration.window.getComputedStyle
is unavailable, making it compatible with IE 8.There is a Cakefile
for building, watching and linting. All these commands can be run with cake
.
$ cake build # Build the library
$ cake watch # Watch for changes
$ cake lint # Lint the compiled javascript.
Feel free to submit issues or make pull requests.
git push -f origin master:gh-pages
FAQs
A micro-library for iOS-like tap events in the browser
We found that iostap 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.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.