3g.renren.com

// ==UserScript==
// @name         3g.renren.com
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match      http://3g.renren.com/*
// @grant        none
// ==/UserScript==
(function(M) {
    var del_doms_of_class = function(b) {
        var a = document.getElementsByClassName(b);
        for (var j = 0, l = a.length; j < l; j++) {
            if (a[j] !== null) {
                a[j].parentNode.removeChild(a[j]);
            }
        }
    };
    var del_dom_of_id = function(b) {
        var a = document.getElementById(b);
        if (a !== null) {
            a.parentNode.removeChild(a);
        }
    };
    del_dom_of_id('fh_top_item');
    del_dom_of_id('fh_top_itemtab1');
    del_dom_of_id('BanAd');
    del_dom_of_id('baiduAd-moveCard');
    del_doms_of_class('fubiao-dialog');
    del_dom_of_id('ft_n_9106');
    del_dom_of_id('Z49');
    del_dom_of_id('F241H7');
    // del_doms_of_class('adsbygoogle');
    del_doms_of_class('fubiao-dialog');
    var head = document.getElementsByTagName('head')[0];
    var o = head.getElementsByTagName('script');
    var tom = [];
    for (var i = o.length - 1; i >= 0; i--) {
        var p = o[i].getAttribute('src') ;
        if (/baidu/.test(p) || /google/.test(p) || /addAd3gwap/.test(p)) {
            tom.push(o[i]);
            head.removeChild(o[i]);
        }
    }
    M();
})(function() {
    var head = document.getElementsByTagName('head')[0],
        script = document.createElement('script');
    script.onload = function() {
        $('#ft_n_9106, .fubiao-dialog, #Z49, .FZ4, #F241H7, .adsbygoogle, #3gwapAD02').remove();
        $('body').css({
            padding: 0
        });
        var chars = [].concat.apply([], Array(26)).map(function(_, i) {
            return String.fromCharCode(i + 65);
        });
        for (var i in chars) {
            var iv = chars[i];
            for (var j in [].concat.apply([], Array(10))) {
                $('#' + iv + '' + j).remove();
            }
        }
    };
    script.type = 'text/javascript';
    script.src = 'https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js';
    head.appendChild(script);
});
if ($(".sec.stat")[0] !== undefined)
    if ($(".sec.stat > .moment")[0] === undefined) {
        var iii = $(".sec.stat").html();
        if (iii.match(/([^<]+)<\/b>([^<>]+)([^<]+<\/span>)/)) var new_content = iii.replace(/([^<]+)<\/b>([^<>]+)([^<]+<\/span>)/, '
$1

$2$3

'); if (iii.match(/([^<>]+)([^<]+<\/span>)/)) var new_content = iii.replace(/([^<>]+)([^<]+<\/span>)/, '

$1$2

'); $(".sec.stat").html(new_content); } $(".list > div:nth-child(n+2)").each(function() { if ($(this).find('.content')[0] === undefined) { var a = $(this).html(), b = a.replace(/([^><]+)<\/a>(.*)

/, '$1

$2

'); $(this).html(b); var em = $(this).find('em'); if (em !== null) em.remove(); } var cur = $(this).find('.content'), content = cur.html(); if (content !== null) { var new_content = content.replace(/#([^#]+)#\(([^)]+)\)/g, '#$1#').replace(/: /, ''); cur.html(new_content); } }); $('.content').on('click touchend', function() { $(this).siblings().toggle(); }); $('').insertAfter($(".list")); if ($('input.input_b').next('textarea')[0] === undefined) { $('').insertAfter($('.input_b[name=status]')); $('.input_b[name=status]').hide(); $("input ~ textarea").on('keyup', function() { $(this).prev('input').val($(this).val()); }); }

你可能感兴趣的:(3g.renren.com)