What's new

Shy asian girl strips and shows all

// ==UserScript== // Name NSFWPH Quick Reply Tabs // @namespace nsfwph-helper // @version 9.0 // @description Opens threads in new tabs, auto-fills and auto-submits reply with indefinite retry until success, closes only after successful post // @match https://nsfwph.org/* // @grant none // ==/UserScript== (function () { 'use strict'; // -------------------------------- // 1. NEW POSTS PAGE // Open thread links in another tab // -------------------------------- if (location.pathname.includes("/whats-new/")) { document.addEventListener("click", function (event) { const link = event.target.closest( ".structItem-title a" ); if (!link) return; if ( event.ctrlKey || event.shiftKey || event.altKey || event.metaKey ) return; event.preventDefault(); window.open(link.href, "_blank"); }); console.log("Quick Reply: New Posts mode"); return; } // -------------------------------- // 2. THREAD PAGE - AUTO FILL & SUBMIT WITH INDEFINITE RETRY // -------------------------------- let isProcessing = false; let stopRetry = false; // set to true to abort (not used here) function getEditor() { return document.querySelector( ".fr-element[contenteditable='true']" ) || document.querySelector( "[contenteditable='true']" ); } function getPostButton() { const btns = document.querySelectorAll( "button[type='submit'], input[type='submit']" ); for (let btn of btns) { const name = ( btn.innerText || btn.value || "" ).trim().toLowerCase(); if (name === "post" || name === "post reply") { return btn; } } return null; } async function attemptPasteAndSubmit() { if (isProcessing) return; isProcessing = true; let retryDelay = 3000; // initial delay in ms let attemptCount = 0; while (!stopRetry) { attemptCount++; console.log("Quick Reply: attempt " + attemptCount); try { // Read clipboard const text = await navigator.clipboard.readText(); if (!text || !text.trim()) { console.log("Quick Reply: clipboard empty, waiting..."); await new Promise(resolve => setTimeout(resolve, retryDelay)); retryDelay = Math.min(retryDelay + 2000, 15000); // backoff up to 15s continue; } // Find editor const editor = getEditor(); if (!editor) { console.log("Quick Reply: editor not found, waiting..."); await new Promise(resolve => setTimeout(resolve, retryDelay)); retryDelay = Math.min(retryDelay + 2000, 15000); continue; } // If editor already has content, check if it's from previous failed attempt? // We'll clear it if we are retrying (to avoid "not empty" skip) if (editor.innerText.trim()) { // Clear it so we can paste fresh editor.textContent = ''; editor.dispatchEvent(new InputEvent("input", { bubbles: true, inputType: "insertText", data: '' })); // Wait a bit for UI to update await new Promise(resolve => setTimeout(resolve, 200)); } // Paste editor.focus(); editor.textContent = text; editor.dispatchEvent( new InputEvent("input", { bubbles: true, inputType: "insertText", data: text }) ); editor.scrollIntoView({ behavior: "smooth", block: "center" }); console.log("Quick Reply: clipboard inserted."); // Wait for XenForo to register await new Promise(resolve => setTimeout(resolve, 800)); // Find and click Post button const submitBtn = getPostButton(); if (!submitBtn) { console.log("Quick Reply: Post button not found, waiting..."); await new Promise(resolve => setTimeout(resolve, retryDelay)); retryDelay = Math.min(retryDelay + 2000, 15000); continue; } console.log("Quick Reply: clicking Post (attempt " + attemptCount + ")"); submitBtn.click(); // Now wait to see if post succeeded (editor becomes empty) let success = false; let checks = 0; const maxChecks = 20; // 20 * 500ms = 10 seconds await new Promise((resolve) => { const interval = setInterval(() => { checks++; const currentEditor = getEditor(); if (currentEditor && !currentEditor.innerText.trim()) { success = true; clearInterval(interval); resolve(); } else if (checks >= maxChecks) { // Timeout - assume failure clearInterval(interval); resolve(); } }, 500); }); if (success) { console.log("Quick Reply: post successful. Closing tab."); // Close tab only after success setTimeout(() => { if (window.opener) { window.close(); } }, 1000); isProcessing = false; return; // exit the loop } else { console.log("Quick Reply: post not confirmed (cooldown or error). Will retry after delay."); // Wait for cooldown - longer delay await new Promise(resolve => setTimeout(resolve, retryDelay)); retryDelay = Math.min(retryDelay + 5000, 30000); // increase delay up to 30s // Continue loop to retry } } catch (error) { console.log("Quick Reply: error: " + error); await new Promise(resolve => setTimeout(resolve, retryDelay)); retryDelay = Math.min(retryDelay + 5000, 30000); } } isProcessing = false; } // -------------------------------- // 3. DETECT MANUAL POST CLICK (for closing tab if manual) // (We keep this for manual clicks, but auto will also close on success) // -------------------------------- document.addEventListener("click", function (event) { const button = event.target.closest( "button[type='submit'], input[type='submit']" ); if (!button) return; const name = ( button.innerText || button.value || "" ).trim().toLowerCase(); if (name !== "post" && name !== "post reply") return; console.log("Quick Reply: manual Post clicked."); // Wait for post success and close if applicable let checks = 0; const watcher = setInterval(() => { checks++; const editor = getEditor(); if (editor && !editor.innerText.trim()) { clearInterval(watcher); console.log("Quick Reply: manual post appears successful."); setTimeout(() => { if (window.opener) { window.close(); } }, 1000); } if (checks >= 30) { clearInterval(watcher); } }, 500); }); // -------------------------------- // 4. START AUTO PROCESS AFTER THREAD LOADS // -------------------------------- setTimeout(attemptPasteAndSubmit, 1500); // -------------------------------- // 5. BIG POST BUTTON STYLE // -------------------------------- const style = document.createElement("style"); style.textContent = .formSubmitRow-controls { text-align: right !important; } button[type="submit"] { min-width: 280px !important; min-height: 80px !important; font-size: 28px !important; font-weight: bold !important; padding: 18px 45px !important; cursor: pointer !important; float: right !important; margin-left: auto !important; margin-right: 10px !important; } ; document.head.appendChild(style); })();
 

About this Thread

  • 14
    Replies
  • 5K
    Views
  • 14
    Participant count
Last reply from:
kurtsss

Trending Topics

Online now

Members online
3,363
Guests online
1,618
Total visitors
4,981

Forum statistics

Threads
556,529
Posts
10,453,068
Members
467,325
Latest member
abb1234
Back
Top