دعم الموقع

delete all from watchlist and favorites

2 ردود (على هذه الصفحة 1 من 1)

Jump to last post

or at lest let me mark the shows and then click delete/ Remove

// ==UserScript== // @name TMDB Auto Remover with Button in List Options (Fixed Load More) // @namespace http://tampermonkey.net/ // @version 1.2 // @description Adds a "Remove All" button inside list options and removes items, then clicks Load More properly // @match https://www.themoviedb.org/u/Kolex06/* // @grant none // ==/UserScript==

(function () { 'use strict';

const delay = ms => new Promise(res => setTimeout(res, ms));

// Function to remove items on the page
async function removeItems() {
    let removeButtons = document.querySelectorAll('a.account_list_action[data-remove="true"]');
    for (let btn of removeButtons) {
        btn.click();
        await delay(500); // Wait for the removal to process
    }
}

// Function to click the "Load More" button
async function loadMoreItems() {
    const loadMoreButton = document.querySelector('a.load_more');
    if (loadMoreButton) {
        loadMoreButton.click();
        console.log("🔄 Clicking Load More...");
        await delay(3000); // Wait for new items to load
        return true;
    }
    console.log("⚠️ No more 'Load More' button found.");
    return false;
}

// Function to start removing all items and loading more
async function processAllItems() {
    let hasMoreItems = true;
    while (hasMoreItems) {
        await removeItems();  // Remove visible items

        hasMoreItems = await loadMoreItems();  // Try loading more items

        if (hasMoreItems) {
            console.log("✨ Items removed, new items loaded.");
        } else {
            console.log("🎉 All items have been removed.");
        }
    }
}

// Add the "Remove All" button inside the list_option_wrapper
function addRemoveButton() {
    const listOptionWrapper = document.querySelector('.list_option_wrapper');
    if (!listOptionWrapper) return;

    const button = document.createElement('button');
    button.textContent = "Remove All Items";
    button.style.backgroundColor = "#ff4f4f";
    button.style.color = "#fff";
    button.style.padding = "8px 16px";
    button.style.fontSize = "14px";
    button.style.border = "none";
    button.style.cursor = "pointer";
    button.style.marginTop = "10px";
    button.style.borderRadius = "5px";
    button.addEventListener('click', () => {
        processAllItems();
    });

    listOptionWrapper.appendChild(button);
}

// Add the "Remove All" button when the page is loaded
window.addEventListener('load', () => {
    setTimeout(addRemoveButton, 2000); // Add button after the page loads
});

})();

لم تجد الفلم أو المسلسل ؟ سجل دخولك و انشئها

عام

s ركز شريط البحث
p افتح قائمة الملف الشخصي
esc اغلق النافذة المفتوحة
? افتح نافذة اختصارات لوحة المفاتيح

على كافة صفحات الوسائط

b ارجع للخلف (او للصفحة الام عند التطبيق)
e انتقل لصفحة التعديل

على كافة صفحات موسم المسلسل

(السهم الايمن) انتقل للموسم التالي
(السهم الايسر) انتقل للموسم السابق

على كافة صفحات حلقة المسلسل

(السهم الايمن) انتقل للحلقة التالية
(السهم الايسر) انتقل للحلقة السابقة

على كافة صفحات الصور

a افتح صفحة اضافة الصورة

على كافة صفحات التعديل

t افتح محدد الترجمة
ctrl+ s ارسال النموذج

على صفحات المناقشة

n انشى نقاش جديد
w تبديل حالة المتابعة
p تبديل عام / خاص
c تبديل اغلاق / فتح
a افتح الانشطة
r رد على النقاش
l انتقل لأخر رد
ctrl+ enter أرسل رسالتك
(السهم الايمن) الصفحة التالية
(السهم الايسر) الصفحة السابقة

الاعدادات

هل تريد تقييم او اضافة هذا العنصر للقائمة؟

تسجيل الدخول