TikTok Live Expander

Automatically clicks show more on following and recommending

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==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);