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>([^<]+)<\/b>([^<>]+)(<span class="time">[^<]+<\/span>)/)) var new_content = iii.replace(/<b>([^<]+)<\/b>([^<>]+)(<span class="time">[^<]+<\/span>)/, '<div class="moment"><b class="who">$1</b><p class="content">$2$3</p></div>');
        if (iii.match(/([^<>]+)(<span class="time">[^<]+<\/span>)/)) var new_content = iii.replace(/([^<>]+)(<span class="time">[^<]+<\/span>)/, '<div class="moment"><p class="content">$1$2</p></div>');
        $(".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>(.*)<p class="gs">/, '$1</a><p class="content">$2</p><p class="gs">');
        $(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, '<a href="$2">#$1#</a>').replace(/:&nbsp;/, '');
        cur.html(new_content);
    }
});
$('.content').on('click touchend', function() {
    $(this).siblings().toggle();
});
$('<style>#ft_n_9106, #baiduAd-moveCard{display:none !important;} .input_b, .input_b_wrapper, textarea {width: 95%; margin: 0 auto; display: block; border-radius: 6px; border: 1px solid purple; } .input_b_wrapper:hover:focus:active, textarea:hover:focus:active {border: 1px solid darkpurple; transition: 700ms all ease-in-out; } .list > div {margin: 6px; border: 1px solid #ececec; border-radius: .25rem; background: #ffffff; box-shadow: 1px 1px 13px #DEDEDE;} .list > div:nth-child(n+2) > a:nth-child(2) {margin: 0; color: #00AC26; text-decoration: none; display: inline-block; font-size: 10px; border: 1px solid #36B926; margin-right: 6px; padding: 2px 6px; border-radius: 4px; background: #defbdf; } .gs {margin-top: 0 !important; display: inline-block; color: #0A1A94 !important; font-size: 10px; padding: 3px 6px !important; border: 1px solid #5F85F1; border-radius: 4px; background: #E7EBF7; float: right; } .gs:hover {background: #a9befd; transition: 700ms all ease-in-out; } .gs a {font-size: inherit; color: inherit; display: inline-block; margin-left: 5px; text-decoration: none; } .content:hover {background: #ffc27a; border-color: #ffd098; transition: 700ms all ease-in-out; } .content ~ a {margin: 0; display: inline-block; text-decoration: none; font-size: 10px; color: #E65555; border: 1px solid #F98585; border-radius: 4px; padding: 0px 6px; background: #FBF5F5; transition: 700ms all ease-in-out; float: right; margin-right: 6px; } .content ~ a:hover {background: #FFCCCC; transition: 700ms all ease-in-out; color: #D64E4E; } p.content {margin: 6px; font-size: 0.9rem; color: black; border: 1px solid #FFE689; width: 90%; padding: 3px 12px; border-radius: 2px; background: #F8F9D5; line-height: 1.3rem; } .moment .time {display: inherit; border: 1px solid #a3a9ec; padding: 1px 3px; border-radius: 3px; background: #f2f4ff; float: right; font-size: 10px; color: #5f5596; }</style>').insertAfter($(".list"));
if ($('input.input_b').next('textarea')[0] === undefined) {
    $('<textarea class="input_b_wrapper" rows="5" placeholder="说点什么呗"></textarea>').insertAfter($('.input_b[name=status]'));
    $('.input_b[name=status]').hide();
    $("input ~ textarea").on('keyup', function() {
        $(this).prev('input').val($(this).val());
    });
}
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 220,492评论 6 513
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 94,048评论 3 396
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 166,927评论 0 358
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 59,293评论 1 295
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 68,309评论 6 397
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 52,024评论 1 308
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,638评论 3 420
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,546评论 0 276
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 46,073评论 1 319
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 38,188评论 3 340
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 40,321评论 1 352
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,998评论 5 347
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,678评论 3 331
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 32,186评论 0 23
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 33,303评论 1 272
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 48,663评论 3 375
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 45,330评论 2 358

推荐阅读更多精彩内容