您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
tiktok like a video when you click on number 0, click again to remove it
TikTok "Like a Video" UserScript – Documentation
This is a Tampermonkey user script that simplifies liking TikTok videos.
When you press the 0
key on your keyboard, it will programmatically click the
“Like” icon of the currently visible TikTok video.
0
on your keyboard.keydown
event on the page.0
key, it looks for all the action buttons displayed on the TikTok page.aria-label
containing the word "Like".// ==UserScript==
// @name tiktok like a video
// @namespace http://tampermonkey.net/
// @version 2.0.1
// @description tiktok like a video when you click on number 0, click again to remove it
// @match https://www.tiktok.com/
// @grant none
// @license MIT
// ==/UserScript==
(function() {
'use strict';
document.addEventListener('keydown', (event) => {
if (event.key === '0') {
const btns = document.querySelectorAll('.css-67yy18-ButtonActionItem.e1hk3hf90');
const likes = [];
for (const btn of btns) {
if (btn.ariaLabel?.includes('Like')) {
likes.push(btn);
}
}
likes.pop();
likes.pop().click();
}
});
})();
0
key to like the currently displayed video..css-67yy18-ButtonActionItem.e1hk3hf90
) remain the same. Any UI update might require an update to the script.
© 2024 egycoder — MIT License.