Greasy Fork is available in English.

NGA碧蓝航线动态表情包

将 碧蓝航线游戏内表情加入到表情列表中

// ==UserScript==
// @name         NGA碧蓝航线动态表情包
// @namespace    https://greasyfork.org/zh-CN/scripts/377814
// @version      1.0.2
// @icon         http://bbs.nga.cn/favicon.ico
// @description  将 碧蓝航线游戏内表情加入到表情列表中
// @author       aiyom
// @match        *://bbs.nga.cn/post.php*
// @match        *://ngabbs.com/post.php*
// @match        *://nga.178.com/post.php*
// @grant        none
// @require      https://greasyfork.org/scripts/39014-nga-user-script-loader/code/NGA%20User%20Script%20Loader.js
// ==/UserScript==

//此脚本发布地址:https://ngabbs.com/read.php?tid=16423356

(function(){

    function init($){

        let a = commonui.blhxDT = {
      data: [
          './mon_201902/16/-mjkdpQ5-hv22ZmT1kS55-46.gif',
          './mon_201902/16/-mjkdpQ5-g8qmK22T1kS43-46.gif',
          './mon_201902/16/-mjkdpQ5-e1veK1sT1kS3q-46.gif',
          './mon_201902/16/-mjkdpQ5-epcoZbT1kS3t-46.gif',
          './mon_201902/16/-mjkdpQ5-1eseZcT1kS4u-46.gif',
          './mon_201902/16/-mjkdpQ5-bu9mZcT1kS4o-46.gif',
          './mon_201902/16/-mjkdpQ5-78toZfT1kS4s-46.gif',
          './mon_201902/16/-mjkdpQ5-4rhfZdT1kS4z-46.gif',
          './mon_201902/16/-mjkdpQ5-ifbxZfT1kS55-46.gif',
          './mon_201902/16/-mjkdpQ5-8ne7ZeT1kS4s-46.gif',
          './mon_201902/16/-mjkdpQ5-8370ZeT1kS4g-46.gif',
          './mon_201902/16/-mjkdpQ5-jseeZbT1kS3n-46.gif',
          './mon_201902/16/-mjkdpQ5-61jlZdT1kS4i-46.gif',
          './mon_201902/16/-mjkdpQ5-qbkZcT1kS3n-46.gif',
          './mon_201902/16/-mjkdpQ5-alfeZeT1kS54-46.gif',
          './mon_201902/16/-mjkdpQ5-6h3yZcT1kS55-2w.gif',
          './mon_201902/16/-mjkdpQ5-gdqxZbT1kS4d-46.gif',
          './mon_201902/16/-mjkdpQ5-2tuuZdT1kS4n-46.gif',
          './mon_201902/16/-mjkdpQ5-kc8aZgT1kS55-3s.gif',
          './mon_201902/16/-mjkdpQ5-cj9qZgT1kS4e-46.gif',
          './mon_201902/16/-mjkdpQ5-9mu7ZaT1kS55-40.gif',
          './mon_201902/16/-mjkdpQ5-eaydZaToS3k-46.gif',
          './mon_201902/16/-mjkdpQ5-kk1mZgT1kS4h-46.gif',
          './mon_201902/16/-mjkdpQ5-27p2ZbT1kS48-46.gif',
      ],
            f: function(e){
                let t = $(e.target),
                    tmp = t.parent().next().children(),
                    imgs = tmp.eq(t.index() - 1);
                if(!imgs.children()[0])
                    $.each(a.data, function(i, v){
                        imgs.append('<img height="60px" src="http://img.ngacn.cc/attachments/' + v + '" onclick="postfunc.addText(\'[img]' + v + '[/img]\');postfunc.selectSmilesw._.hide()" />');
                    });
                $.each(tmp, function(i, d){
                    if(i == t.index() - 1)
                        d.style.display = '';
                    else
                        d.style.display = 'none';
                });
                t.parent().children().eq(0).html('');
            },
            r: function(){
                $('[title="插入表情"]:not([blhx-dt])').attr('blhx-dt', 1).bind('click.blhxDTAddBtn', function(){
                    setTimeout(function(){
                        $('.single_ttip2 div.div3 div:has(button:contains("AC娘(v1)")):not(:has(button:contains("碧蓝航线动态")))').append('<button class="block_txt_big">碧蓝航线动态</button>').find(':contains("碧蓝航线动态")').bind('click.blhxDTBtn', a.f)
                            .end().next().append('<div />');
                    },100);
                });
            },
            mo: new MutationObserver(function(){
                a.r();
            })
        };

        a.r();

        a.mo.observe($('body')[0], {
            childList: true,
            subtree: true,
        });

    }

    (function check(){
        try{
            init(commonui.userScriptLoader.$);
        }
        catch(e){
            setTimeout(check, 50);
        }
    })();

})();