TikTok Live Expander

Automatically clicks show more on following and recommending

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name TikTok Live Expander
// @author fulingen
// @description Automatically clicks show more on following and recommending
// @version 0.3.2
// @license GNU GPLv3
// @supportURL https://t.me/fulingen
// @match https://www.tiktok.com/live
// @match https://www.tiktok.com/live*
// @match https://www.tiktok.com/*/live
// @match https://www.tiktok.com/*/live*
// @namespace https://greasyfork.org/users/980311
// ==/UserScript==

const xpr = XPathResult.FIRST_ORDERED_NODE_TYPE;
const text = 'See all';
let xpath;
let node;

setInterval(() => {
  xpath = '/html/body/div[1]/main/div[4]/div[1]/div/div[1]/div[1]/div/div[2]/div/div[2]/div[6]';
  node = document.evaluate(xpath, document, null, xpr, null).singleNodeValue;

  if (node) {
    if (node.innerText == text) {
      node.click();
    }
  }

  xpath = '/html/body/div[1]/main/div[4]/div[1]/div/div[1]/div[1]/div/div[3]/div/div[2]/div[6]';
  node = document.evaluate(xpath, document, null, xpr, null).singleNodeValue;

  if (node) {
    if (node.innerText == text) {
      node.click();
    }
  }

}, 100);