Greasy Fork

NGA AC娘表情FGO化补完计划 by 间桐咕哒子@NGA

将 间桐咕哒子@NGA 制作的FGO化AC娘表情加入到表情列表中

目前为 2017-03-28 提交的版本。查看 最新版本

// ==UserScript==
// @name         NGA AC娘表情FGO化补完计划 by 间桐咕哒子@NGA
// @namespace    none
// @version      1.0.0.20170327
// @icon         http://bbs.nga.cn/favicon.ico
// @description  将 间桐咕哒子@NGA 制作的FGO化AC娘表情加入到表情列表中
// @author       AgLandy
// @include      /^https?://(bbs\.ngacn\.cc|nga\.178\.com|bbs\.nga\.cn)/.+/
// @grant        none
// @require      http://cdn.bootcss.com/jquery/3.2.1/jquery.min.js
// ==/UserScript==

var jQ = jQuery.noConflict();

(function(){

    var sc = "\
    var acFGOdata = [\
        './mon_201703/26/f0Q2g-d4azKqToS5k-5k.png',\
        './mon_201703/26/f0Q2g-3ax1K18ToS5k-5k.png',\
        './mon_201703/26/f0Q2g-uxqKrToS5k-5k.png',\
        './mon_201703/26/f0Q2g-12nwKwToS5k-5k.png',\
        './mon_201703/26/f0Q2g-6y10KvToS5k-5k.png',\
        './mon_201703/26/f0Q2g-25ykKxToS5k-5k.png',\
        './mon_201703/26/f0Q2g-37txKyToS5k-5k.png',\
        './mon_201703/26/f0Q2g-1e8uKrToS5k-5k.png',\
        './mon_201703/26/f0Q2g-gt18KvToS5k-5k.png',\
        './mon_201703/26/f0Q2g-3kvkKkToS5k-5k.png',\
        './mon_201703/26/f0Q2g-bqwzKlToS5k-5k.png',\
        './mon_201703/26/f0Q2g-k56KmToS5k-5k.png',\
        './mon_201703/26/f0Q2g-u3zKsToS5k-5k.png',\
        './mon_201703/26/f0Q2g-jkjsKuToS5k-5k.png',\
        './mon_201703/26/f0Q2g-8nucKuToS5k-5k.png',\
        './mon_201703/26/f0Q2g-feswK18ToS5k-5k.png',\
        './mon_201703/26/f0Q2g-635jKrToS5k-5k.png',\
        './mon_201703/26/f0Q2g-jwyoKrToS5k-5k.png',\
        './mon_201703/26/f0Q2g-mfvKsToS5k-5k.png',\
        './mon_201703/26/f0Q2g-jgquK13ToS5k-5k.png',\
        './mon_201703/26/f0Q2g-8oiyKpToS5k-5k.png',\
        './mon_201703/27/f0Q2g-l7zaK16ToS6h-5k.png',\
        './mon_201703/27/f0Q2g-ai40K11ToS6h-5k.png',\
        './mon_201703/27/f0Q2g-la8cKzToS6h-5k.png',\
        './mon_201703/27/f0Q2g-9smzK11ToS6h-5k.png',\
        './mon_201703/27/f0Q2g-imlyK12ToS6h-5k.png',\
        './mon_201703/27/f0Q2g-8gw3K13ToS6h-5k.png',\
    ];\
    function acFGO(e){\
        var n = e.target.nextSibling;\
        if(n.firstChild)\
            return;\
        var tmp = '';\
        for(i = 0; acFGOdata.length > i; i++){\
            tmp += '<img width=\"70px\" src=\"http://img.ngacn.cc/attachments/' + acFGOdata[i] + '\" onclick=\"postfunc.addText(\\'[img]' + acFGOdata[i] + '[/img]\\');postfunc.dialog.w._.hide()\" \/>';\
        }\
        n.innerHTML = tmp;\
    }\
    ";

    jQ('head').append(jQ('<script type="text/javascript" />').html(sc));

    function go(){
        jQ("[title='插入表情']").click(function(){
            setTimeout(function(){
                jQ('.single_ttip2').find('div.div3').append(jQ('<button name="FGO" onclick="acFGO(event)">FGO</button><div></div>'));
            },100);
        });
    }

    go();

    jQ('body').on("click","a[href^='/post.php']",function(){
        setTimeout(function(){
            go();
        },500);
    });

})();