<commit_before>var saved_x, saved_y, direction, currentOpen;
var template = `<div onclick='this.parentNode.parentNode.removeChild(this.parentNode);' class='ylife-touch-delete' style='left:100%;margin: 0;padding:0;display: block;position:absolute;width:85px;top:0;background-color: rgb(230,54,67);color:#fff;text-align: center;font-size: 18px;'>删除</div>`;
var createDelete = function () {
    var _div = div();
    _div.innerHTML = template;
    _div = _div.children[0];
    remove(_div);
    var height = this.clientHeight + "px";
    css(_div, {
        height,
        lineHeight: height
    });
    css(this, "position:relative");
    return _div;
};
var touchstart = function (event) {
    var target = getTargetIn(this, event.target, false);
    if (currentOpen && currentOpen !== target) {
        scrollToRight.call(currentOpen);
    }
    if (!target) return;
    cancelAnimationFrame(target.scrollTimer);
    saved_x = null;
    currentOpen = target;
    if (!target.querySelector(".ylife-touch-delete")) {
        css(target, {
            overflow: "hidden"
        });
        var $delete = createDelete.call(target);
        appendChild(target, $delete);
    }
};
var moving = false;
var touchmove = function (event) {
    if (!saved_x) return saved_x = event.clientX, saved_y = event.clientY, moving = false, 0;<commit_msg>添加移除事件<commit_after>var saved_x, saved_y, direction, currentOpen;
var template = `<div class='ylife-touch-delete' style='left:100%;margin: 0;padding:0;display: block;position:absolute;width:85px;top:0;background-color: rgb(230,54,67);color:#fff;text-align: center;font-size: 18px;'>删除</div>`;
var createDelete = function () {
    var _div = div();
    _div.innerHTML = template;
    _div = _div.children[0];
    remove(_div);
    var height = this.clientHeight + "px";
    css(_div, {
        height,
        lineHeight: height
    });
    css(this, "position:relative");
    return _div;
};
var touchstart = function (event) {
    var target = getTargetIn(this, event.target, false);
    if (currentOpen && currentOpen !== target) {
        scrollToRight.call(currentOpen);
    }
    if (!target) return;
    cancelAnimationFrame(target.scrollTimer);
    saved_x = null;
    currentOpen = target;
    if (!target.querySelector(".ylife-touch-delete")) {
        css(target, {
            overflow: "hidden"
        });
        var $delete = createDelete.call(target);
        on("click")($delete, function () {
            remove(this.parentNode);
        });
        appendChild(target, $delete);
    }
};
var moving = false;
var touchmove = function (event) {
    if (!saved_x) return saved_x = event.clientX, saved_y = event.clientY, moving = false, 0;
{'fraction_non_alphanumeric': 0.14895988112927191, 'fraction_numerical': 0.01411589895988113, 'mean_word_length': 3.4512396694214877, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3591666', 'n_tokens_mistral': 869, 'n_tokens_neox': 848, 'n_words': 177}