Sleazy Fork is available in English.

LC Game Post Only

Display only the 1st post of a game thread. This completely removes all replies (and more) from the thread.

// ==UserScript==
// @name        LC Game Post Only
// @namespace   1330126-edexal
// @match       *://lewdcorner.com/threads/*
// @grant       none
// @icon        https://external-content.duckduckgo.com/ip3/lewdcorner.com.ico
// @license     Unlicense
// @version     1.1.2
// @author      Edexal
// @description Display only the 1st post of a game thread. This completely removes all replies (and more) from the thread.
// ==/UserScript==
(async function(){
  function deleteEls(el){
    if (el instanceof NodeList){
      el.forEach((curVal,curIndex)=>{
        curVal.remove();
      });
    } else if (el instanceof Element) {
      el.remove();
    }else{
      console.error(`Unable to delete ${el}! Element is of type: ${typeof el}.`);
    }

  }

   async function removeFooter(){
    let footer = document.querySelector("#footer");
    await deleteEls(footer);
  }

  async function removeNotices(){
    let notices = document.querySelectorAll(".notices");
    await deleteEls(notices);
  }

  async function removeBreadcrumbs(){
    let breadcrumb = document.querySelector(".p-breadcrumbs--container");
    await deleteEls(breadcrumb);
  }

  async function removeAccountItems(){
    let accountDetails = document.querySelectorAll(".p-navgroup-link--user, [data-nav-id*=user], div.p-offCanvasAccountLink");
    await deleteEls(accountDetails);
  }

  async function removeReplyItems() {
    let replyForm = document.querySelector('form.js-quickReply');
    await !!replyForm ? deleteEls(replyForm) : null;

    let replyActions = document.querySelectorAll('a.actionBar-action--mq,  a.actionBar-action--reply');
    await !!replyActions ? deleteEls(replyActions) : null;
  }

  async function removeRecomendations() {
    let recomendationSection = document.querySelector('div[data-widget-key*=similar_threads]');
    await !!recomendationSection ? deleteEls(recomendationSection) : null;
  }

  async function removeShareWidget() {
    let shareWidget = document.querySelector('div.shareButtons').parentNode;
    await !!shareWidget ? deleteEls(shareWidget) : null;
  }

  async function showFirstPostOnly() {
    //Thread Post Container Ref
    let opContainer = document.querySelector("article.message-threadStarterPost").parentNode;
    opContainer.replaceChildren(opContainer.children.item(0));

    let paginations = document.querySelectorAll('.pageNavWrapper--mixed');
    //top pagination
    let topPageContainer = paginations[0].parentNode.parentNode;
    await !!topPageContainer ? deleteEls(topPageContainer) : null;

    //bottom pagination
    let bottomPageContainer = paginations[1].parentNode.parentNode;
    await !!bottomPageContainer ? deleteEls(bottomPageContainer) : null;
  }

  /*Checks if thread is a GAME type*/
  if(!!document.querySelector("[data-field=OS]")){
    await showFirstPostOnly();
    /*-----------------------(Optional) Delete '//' for each option to activate----------------*/
    //await removeAccountItems();//Removes account related elements from the page (including hidden ones)
    await removeBreadcrumbs();
    //await removeNotices();
    await removeFooter();
    await removeRecomendations();//Removes the similar threads section at the bottom of the page
    await removeReplyItems();//Removes reply related elements from the page
    //await removeShareWidget();
  }

})().catch((err)=> console.error(err));