XO Java

XO with additional PumoBlocker functionality

22.03.2022 itibariyledir. En son verisyonu görün.

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         XO Java
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  XO with additional PumoBlocker functionality
// @author       FizzKidd
// @match        https://autoadmit.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=autoadmit.com
// @grant        none
// @license      GPLv3
// ==/UserScript==


function addGlobalStyle(css) {
   var head, style;
   head = document.getElementsByTagName('head')[0];
   if (!head) { return; }
   style = document.createElement('style');
   style.type = 'text/css';
   style.innerHTML = css;
   head.appendChild(style);
}

function delPumo() {
    const author = / /;
    const pumoAuthor = / [\\'",\.\:;]*[\\'",\.\:;]/;
    var post = document.getElementsByTagName('p');

    const linkPumoAuthor = /Serif"\>[\\'",\.\:;]*[\\'",\.\:;]\<\/font\>/;
    const image = /\<img src\="blank/;
    var postLink = document.getElementsByTagName('tr');
    //alert("number of tr elements: " + postLink.length);


    // Clean up tree
    for (let i = 1; i < postLink.length; i++) {
        if (linkPumoAuthor.test(postLink[i].innerHTML)) {
            //alert("linkPumoAuthor found");

            for (let j = i + 2; j < postLink.length; j++) {
                if (!image.test(postLink[j].innerHTML) || (image.test(postLink[i].innerHTML) && image.test(postLink[j].innerHTML) && (parseInt(postLink[j].getElementsByTagName('img')[0].getAttribute('width')) < parseInt(postLink[i].getElementsByTagName('img')[0].getAttribute('width'))))) {
                    break;
                };

                if (image.test(postLink[j].innerHTML) && (!image.test(postLink[i].innerHTML) || (parseInt(postLink[j].getElementsByTagName('img')[0].getAttribute('width')) > parseInt(postLink[i].getElementsByTagName('img')[0].getAttribute('width'))))) {
                    postLink[j].innerHTML = "";
                };

            };

            postLink[i].innerHTML = "";

        };
    };


    // Clean up posts
    for (let i = 0; i < post.length; i++) {
        if (pumoAuthor.test(post[i].innerHTML)) {

            for (let j = i + 1; j < post.length; j++) {
                if (author.test(post[j].innerHTML) && ((post[j].getElementsByTagName('td')[0].getAttribute('width') == null) || (parseInt(post[j].getElementsByTagName('td')[0].getAttribute('width')) < parseInt(post[i].getElementsByTagName('td')[0].getAttribute('width'))))) {
                   break;
                };

                if (author.test(post[j].innerHTML) && ((post[i].getElementsByTagName('td')[0].getAttribute('width') == null) || (parseInt(post[j].getElementsByTagName('td')[0].getAttribute('width')) > parseInt(post[i].getElementsByTagName('td')[0].getAttribute('width')) + 10))) {
                   post[j].innerHTML = "";
                };
            };

            post[i].innerHTML = "";

        };
    };
}

(function() {
    'use strict';
    //addGlobalStyle(`font {font-family: 'Monapo'; }`);
    delPumo();
})();