Instagram Close Fix

work around, for the instagram bug to select elements when closing the post

目前为 2023-09-17 提交的版本。查看 最新版本

// ==UserScript==
// @name            Instagram Close Fix
// @namespace       https://greasyfork.org/users/821661
// @description     work around, for the instagram bug to select elements when closing the post
// @match           *://www.instagram.com/*
// @version         1.4
// @author          hdyzen
// @license         MIT
// @run-at          document-idle
// @require         https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js
// ==/UserScript==

(function () {
    "use strict";

    $(document).on("pointerdown pointerup", ".x1qjc9v5.x9f619.x78zum5.xdt5ytf.x1iyjqo2.xl56j7k", function (e) {
        if (e.target.matches(".x1qjc9v5.x9f619.x78zum5.xdt5ytf.x1iyjqo2.xl56j7k")) {
            e.preventDefault();
            e.stopPropagation();
        }
    });

})();