Greasy Fork

Greasy Fork is available in English.

Green Acfun

Change Ac avatar to greeen

当前为 2017-05-03 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Green Acfun
// @namespace    http://Acfun.tv/
// @version      0.1
// @description  Change Ac avatar to greeen
// @author       Rekkles
// @match        https://acfun.tv/
// @grant        none
// ==/UserScript==

(function () {
    'use strict';
    var bool = false;
    var num = 0;
    var isset = true;

    function MakeGreen() {
        if (isset) {
            $(".edui-btn-emotion").click(function () {
                if (!bool) {
                    var posflag = 1;
                    var index = $('.edui-emotion-Jtabnav .edui-tab-item').length;
                    $('.edui-tab-item:last').after("<li class='edui-tab-item'><a data-context='.edui-emotion-Jtab" + index + "' hidefocus='true' class='edui-tab-text'>绿娘</a></li>");
                    var html = '<div class="edui-emotion-Jtab' + index + ' edui-tab-pane">';
                    html += '<table border="1" class="edui-emotion-smileytable"><tbody>';
                    var baseURL = 'http://yimeicrm.cn/umeditor/dialogs/emotion/images/ac/';
                    for (var i = 1; i <= 54; i++) {
                        if (i == 1 || (i + num) % 12 === 0) {
                            html += '<tr>';
                        }
                        var str = i < 10 ? '0' : '';
                        var url = baseURL + str + i + '.png';
                        var po = posflag < 5 ? 0 : 1;
                        html += '<td class="edui-emotion-ac" data-surl="' + url + '?v=0.1" data-realurl="' + url + '" data-posflag="' + po + '" align="center"';
                        html += ' style="background-color: transparent;"><span><img title="' + i + '" src="' + url + '"></span></td>';
                        if (i % 11 === 0 || i == 54) {
                            html += '</tr>';
                            num++;
                        }
                        if (i == 10 || i == 20 || i == 30 || i == 40 || i == 50) {
                            posflag = 1;
                        }
                        posflag++;
                    }
                    html += "</tbody> </table><a style='color:red;position:relative;top:10px;' href='javascript:;' onclick=window.open('https://pan.baidu.com/s/1i5gd8gt')>AC绿娘表情包下载 密码: jgad</a><span style='position:relative;top:10px;left:100px;color:#00aaee'>喜欢的可以在拓展页面捐助。</span></div>";
                    $('.edui-tab-pane:last').after(html);
                    $('.edui-tab-item:last').click();
                }
            });

            $(".edui-btn-emotion").click(function () {
                if (!bool) {
                    num = 0;
                    var posflag = 1;
                    var index = $('.edui-emotion-Jtabnav .edui-tab-item').length;
                    $('.edui-tab-item:last').after("<li class='edui-tab-item'><a data-context='.edui-emotion-Jtab" + index + "' hidefocus='true' class='edui-tab-text'>匿名绿娘</a></li>");
                    var html = '<div class="edui-emotion-Jtab' + index + ' edui-tab-pane">';
                    html += '<table border="1" class="edui-emotion-smileytable"><tbody>';
                    var baseURL = 'http://yimeicrm.cn/umeditor/dialogs/emotion/images/ac/10';
                    for (var i = 1; i <= 40; i++) {
                        if (i == 1 || (i + num) % 12 === 0) {
                            html += '<tr>';
                        }
                        var str = i < 10 ? '0' : '';
                        var url = baseURL + str + i + '.png';
                        var po = posflag < 5 ? 0 : 1;
                        html += '<td class="edui-emotion-ac" data-surl="' + url + '?v=0.1" data-realurl="' + url + '" data-posflag="' + po + '" align="center"';
                        html += ' style="background-color: transparent;"><span><img title="' + i + '" src="' + url + '"></span></td>';
                        if (i % 11 === 0 || i == 40) {
                            html += '</tr>';
                            num++;
                        }
                        if (i == 10 || i == 20 || i == 30 || i == 40 || i == 50) {
                            posflag = 1;
                        }
                        posflag++;
                    }
                    html += "</tbody> </table><a style='color:red;position:relative;top:10px;' href='javascript:;' onclick=window.open('https://pan.baidu.com/s/1hr8VHVQ')>AC匿名绿娘+新娘绿娘表情包下载 密码: v8cs</a><span style='position:relative;top:10px;left:100px;color:#00aaee'>喜欢的可以在拓展页面捐助。</span></div>";
                    $('.edui-tab-pane:last').after(html);
                    $('.edui-tab-item:last').click();
                }
            });

            $(".edui-btn-emotion").click(function () {
                if (!bool) {
                    num = 0;
                    var posflag = 1;
                    var index = $('.edui-emotion-Jtabnav .edui-tab-item').length;
                    $('.edui-tab-item:last').after("<li class='edui-tab-item'><a data-context='.edui-emotion-Jtab" + index + "' hidefocus='true' class='edui-tab-text'>新娘绿娘</a></li>");
                    var html = '<div class="edui-emotion-Jtab' + index + ' edui-tab-pane">';
                    html += '<table border="1" class="edui-emotion-smileytable"><tbody>';
                    var baseURL = 'http://yimeicrm.cn/umeditor/dialogs/emotion/images/ac/20';
                    for (var i = 1; i <= 55; i++) {
                        if (i == 1 || (i + num) % 12 === 0) {
                            html += '<tr>';
                        }
                        var str = i < 10 ? '0' : '';
                        var url = baseURL + str + i + '.png';
                        var po = posflag < 5 ? 0 : 1;
                        html += '<td class="edui-emotion-ac" data-surl="' + url + '?v=0.1" data-realurl="' + url + '" data-posflag="' + po + '" align="center"';
                        html += ' style="background-color: transparent;"><span><img title="' + i + '" src="' + url + '"></span></td>';
                        if (i % 11 === 0 || i == 55) {
                            html += '</tr>';
                            num++;
                        }
                        if (i == 10 || i == 20 || i == 30 || i == 40 || i == 50) {
                            posflag = 1;
                        }
                        posflag++;
                    }
                    html += "</tbody> </table><a style='color:red;position:relative;top:10px;' href='javascript:;' onclick=window.open('https://pan.baidu.com/s/1hr8VHVQ')>AC匿名绿娘+新娘绿娘表情包下载 密码: v8cs</a><span style='position:relative;top:10px;left:100px;color:#00aaee'>喜欢的可以在拓展页面捐助。</span></div>";
                    $('.edui-tab-pane:last').after(html);
                    $('.edui-tab-item:last').click();
                }
                bool = true;
            });
            isset = false;
        }
    }

    function setImgClass() {
        $('img').each(function () {
            if ($(this).attr('src') != '' && $(this).attr('src') != null && $(this).attr('src') != undefined) {
                var str = $(this).attr('src');
                if (str.indexOf('http://yimeicrm.cn') >= 0) {
                    $(this).attr('class', 'emotion');
                }
            }
        })
    }

    window.setInterval(MakeGreen, 2000);

    window.setInterval(setImgClass, 3000);
})();