Greasy Fork

Greasy Fork is available in English.

小红书快捷键(个人用)

自定义快捷键

目前为 2024-04-20 提交的版本,查看 最新版本

// ==UserScript==
// @name         小红书快捷键(个人用)
// @namespace    http://tampermonkey.net/
// @version      2024-04-20
// @description  自定义快捷键
// @author       hztdream
// @match        https://www.xiaohongshu.com
// @icon         https://www.google.com/s2/favicons?sz=64&domain=xiaohongshu.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    // Your code here...
    document.addEventListener('keydown', function(event) {
        if (event.key === 'c') {
            var likeBtn = document.querySelector('.engage-bar-style span.like-wrapper.like-active');
            likeBtn.click();
        }
    });
})();