<commit_before>XClick
=============

Demo file here http://louisameline.github.io/XClick

Predict and prevent x-clicks (jQuery plugin).
-------------------------

As of 2013/11/17, x-clicks happen in Internet Explorer *only*. Not sure when this behavior was implemented.

What I call an "x-click" is actually a regular click event which is triggered in the unusual circumstances described below.

An x-click event is triggered on an element when this element is the closest common parent of two children elements, one of which having triggered a mousedown event, the other having triggered a mouseup event. So "x-click" stands for "a click spread across elements". See the demo file.

At some point in your code, you may feel x-clicks are not really clicks. The XClick jQuery plugin catches these tricky x-click events for you so you can take action against them. There is currently no native way to detect or prevent x-clicks. Side note : only real mouse events trigger x-clicks, not events triggered by a script.

Explanations and how-to
-------------------------

Requires jQuery >=1.8

Just make this call : `$.XClick()`

The plugin will start listening to mouse events (mouse down and up) to predict upcoming x-clicks and then sets a handler to catch them when they fire. By default, x-clicks are immediately stopped from propagating.

***Warning*** : the plugin needs all mousedown and mouseup events to bubble up to the body tag. If for some reason you need to stop these events, then launch custom "mousedownSilent" and "mouseupSilent" events instead to keep the plugin working. See the demo file.

Options
-------------------------

Specify options in your calls : `$.XClick(options)`

- You might want to know when an x-click has been triggered. The `onTriggered` option lets you specify a callback function to achieve this.
<commit_msg>Update after test : x-clicks have always existed in IE<commit_after>XClick
=============

Demo file here http://louisameline.github.io/XClick

Predict and prevent x-clicks (jQuery plugin).
-------------------------

As of 2013/11/17, x-clicks happen in Internet Explorer *only*, in all versions (from IE5 to current IE11).

What I call an "x-click" is actually a regular click event which is triggered in the unusual circumstances described below.

An x-click event is triggered on an element when this element is the closest common parent of two children elements, one of which having triggered a mousedown event, the other having triggered a mouseup event. So "x-click" stands for "a click spread across elements". See the demo file.

At some point in your code, you may feel x-clicks are not really clicks. The XClick jQuery plugin catches these tricky x-click events for you so you can take action against them. There is currently no native way to detect or prevent x-clicks. Side note : only real mouse events trigger x-clicks, not events triggered by a script.

Explanations and how-to
-------------------------

Requires jQuery >=1.8

Just make this call : `$.XClick()`

The plugin will start listening to mouse events (mouse down and up) to predict upcoming x-clicks and then sets a handler to catch them when they fire. By default, x-clicks are immediately stopped from propagating.

***Warning*** : the plugin needs all mousedown and mouseup events to bubble up to the body tag. If for some reason you need to stop these events, then launch custom "mousedownSilent" and "mouseupSilent" events instead to keep the plugin working. See the demo file.

Options
-------------------------

Specify options in your calls : `$.XClick(options)`

- You might want to know when an x-click has been triggered. The `onTriggered` option lets you specify a callback function to achieve this.

{'fraction_non_alphanumeric': 0.09801821103374397, 'fraction_numerical': 0.006159614354579539, 'mean_word_length': 3.483793517406963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1283858', 'n_tokens_mistral': 950, 'n_tokens_neox': 916, 'n_words': 551}