绯月表情增强插件

KF论坛专用的回复表情, 插图扩展插件, 在发帖时快速输入自定义表情和论坛BBCODE

目前為 2017-02-10 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name       绯月表情增强插件
// @namespace   https://greasyfork.org/users/5415
// @version     4.3.5
// @author      eddie32
// @description KF论坛专用的回复表情, 插图扩展插件, 在发帖时快速输入自定义表情和论坛BBCODE
// @icon        https://blog.nekohand.moe/favicon.ico
// @homepage    https://github.com/liu599/KF-Emotion-UserScript
// @include     https://*miaola.info/*
// @include     http://*2dkf.com/*
// @include     http://*9moe.com/*
// @include     http://*kfgal.com/*
// @copyright   2014-2017, eddie32
// @grant       none
// @license     MIT
// @run-at      document-end
// ==/UserScript==

!function e(t,n,i){function o(r,l){if(!n[r]){if(!t[r]){var c="function"==typeof require&&require;if(!l&&c)return c(r,!0);if(a)return a(r,!0);var d=new Error("Cannot find module '"+r+"'");throw d.code="MODULE_NOT_FOUND",d}var s=n[r]={exports:{}};t[r][0].call(s.exports,function(e){var n=t[r][1][e];return o(n?n:e)},s,s.exports,e,t,n,i)}return n[r].exports}for(var a="function"==typeof require&&require,r=0;r<i.length;r++)o(i[r]);return o}({1:[function(e,t,n){"use strict";var i=function(){function e(e,t,n,i){for(var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],r="",l=0,c=e;c<t;c+=1)l=c,a&&(l=c>9?c:"0"+c),r=""+n+l+i,o.push(r);return o}var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n="4.2.2",i=e(1,17,"http://smile.nekohand.moe/blogAcc/LoveliveEmotion01/EmCol/BiliBili/2233 (",").gif");e(1,14,"http://smile.nekohand.moe/blogAcc/Bilibili/xds/",".png",i),e(0,14,"http://smile.nekohand.moe/blogAcc/LoveliveEmotion01/EmCol/BiliBili/bilibiliTV (",").png",i),e(1,14,"http://smile.nekohand.moe/blogAcc/LoveliveEmotion01/EmCol/tora/0",".jpg",i,!0);var o=e(1,21,"http://smile.nekohand.moe/blogAcc/LoveliveEmotion01/EmCol/Dynamic/akari",".gif");e(1,72,"http://smile.nekohand.moe/blogAcc/LoveliveEmotion01/EmCol/akari/akari",".png",o);var a=e(2,64,"http://nekohand.moe/spsmile/01Sora/0xx",".png");e(1,20,"http://ss.nekohand.moe/Asource/EmotionPic/KFEM (",").gif",a);var r=e(1,51,"http://smile.nekohand.moe/blogAcc/LoveliveEmotion01/EmCol/ACFUN/New/",".png");e(1,40,"http://smile.nekohand.moe/blogAcc/LoveliveEmotion01/EmCol/ACFUN/Niming/",".gif",r,!0);var l=e(1,49,("undefined"!=typeof t?t:"")+"/post/smile/em/em",".gif",[],!0),c=e(10,58,"[s:","]"),d=e(1,41,"http://smile.nekohand.moe/blogAcc/LoveliveEmotion02/Small/Lovelive2nd",".png");e(1,41,"http://smile.nekohand.moe/blogAcc/LoveliveEmotion01/Small/Lovelive",".png",d);var s=["出售贴sell=售价","引用","隐藏hide=神秘等级","插入代码","删除线","跑马灯","文字颜色","粗体","下划线","斜体","水平线","背景色","插入图片"],p=["[sell=100][/sell]","[quote][/quote]","[hide=100][/hide]","[code][/code]","[strike][/strike]","[fly][/fly]","[color=#00FF00][/color]","[b][/b]","[u][/u]","[i][/i]","[hr]","[backcolor=][/backcolor]","[img][/img]"],g=["(●・ 8 ・●)","╰(๑◕ ▽ ◕๑)╯","(ゝω・)","〜♪♪","(゚Д゚≡゚Д゚)","(^o^)ノ","(|||゚Д゚)","(`ε´ )","(╬゚д゚)","(|||゚д゚)","( ̄∇ ̄)","( ̄3 ̄)","( ̄ー ̄)","( ̄ .  ̄)","( ̄︿ ̄)","( ̄︶ ̄)","(*´ω`*)","(・ω・)","(⌒▽⌒)","( ̄▽ ̄)","(=・ω・=)","(`・ω・´)","(〜 ̄△ ̄)〜","(・∀・)","(°∀°)ノ","( ̄3 ̄)","╮( ̄▽ ̄)╭","( ´_ゝ`)","のヮの","(ノ؂< ๑)诶嘿☆~","(&lt;_&lt;)","(&gt;_&gt;)","(;¬_¬)","(▔□▔)/","(゚Д゚≡゚д゚)!?","Σ(゚д゚;)","Σ(  ̄□ ̄||)","(´;ω;`)","(/TДT)/","(^・ω・^ )","(。・ω・。)","(● ̄(エ) ̄●)","ε=ε=(ノ≧∇≦)ノ","(´・_・`)","(-_-#)","( ̄へ ̄)","( ̄ε(# ̄) Σ","ヽ(`Д´)ノ","(╯°口°)╯(┴—┴","(#-_-)┯━┯","_(:3」∠)_","(笑)","(汗)","(泣)","(苦笑)","(´・ω・`)","(╯°□°)╯︵ ┻━┻","(╯‵□′)╯︵┻━┻","( ´ρ`)","( ゚ω゚)","(o゚ω゚o)","( ^ω^)","(。◕∀◕。)","/( ◕‿‿◕ )\\","ε٩( º∀º )۶з","( ̄ε(# ̄)☆╰╮( ̄▽ ̄///)","(●´3`)~♪","_(:з」∠)_","хорошо!","\(^o^)/","(•̅灬•̅ )","(゚Д゚)","まったく、小学生は最高だぜ!!","ε=ε=ε=┏(゜ロ゜;)┛","(;°ほ°)","⎝≧⏝⏝≦⎠","ヽ(✿゚▽゚)ノ","焔に舞い上がるスパークよ、邪悪な異性交際に、天罰を与え!","|•ω•`)"],m={item4:{datatype:"imageLink",title:"固有",addr:l,ref:c},item1:{datatype:"plain",title:"快捷",addr:p,ref:s},item2:{datatype:"plain",title:"颜文字",addr:g},item5:{datatype:"image",title:"ACFUN",addr:r},item6:{datatype:"image",title:"常用",addr:a},item7:{datatype:"image",title:"Akari",addr:o},item8:{datatype:"image",title:"BiliBili",addr:i},item3:{datatype:"image",title:"LoveLive",addr:d}},u={getEvent:function(e){return e||window.event},getTarget:function(e){return e.target||e.srcElement},preventDefault:function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},addHandler:function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},removeHandler:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}},f={create:function(e){return document.createElement(e)},selectID:function(e){return document.getElementById(e)},select:function(e){return document.querySelector(e)}},v={showImg:function(e){var t=u.getTarget(e),n=f.selectID("largeView"),i=[document.body.scrollTop,document.body.scrollLeft],o=i[0],a=i[1];n.innerHTML="<img src="+t.src+" />",n.style.display="block",n.style.top=e.clientY+o+20+"px",n.style.left=e.clientX+a+"px"},clearImg:function(){f.selectID("largeView").style.display="none"}},h={attachEmotion:function(e){var t=u.getTarget(e),n="",i="";2===t.attributes.length&&t.src?(n=t.src,i=h.addressParse(n,"image")):(n=t.attributes[0].nodeValue,i=h.addressParse(n,"plain"));var o=f.select("textarea"),a=o.value,r=o.selectionStart;o.value=""+a.slice(0,r)+i+a.slice(r)},addressParse:function(e,t){var n="";return"image"===t&&(n="[img]"+e+"[/img]"),"plain"===t&&(n=decodeURI(e)),"imageLink"===t&&(n=e),n}},x={createContainer:function(e){var t=f.create("div");return t.id="eddie32"+e,f.selectID("toggleWindow").style.height="100px",f.selectID("toggleWindow").appendChild(t),t},createImages:function(e){for(var t=x.createContainer(e),n=m[e].addr,i=n.length,o=0;o<i;o+=1){var a=f.create("div");a.className="clickItem";var r=f.create("img");r.src=n[o],r.className="Ems",r.onclick=h.attachEmotion,r.onmouseover=v.showImg,r.onmouseout=v.clearImg,a.appendChild(r),t.appendChild(a)}},createPlainText:function(e){for(var t=x.createContainer(e),n=m[e].addr,i=n.length,o=0;o<i;o+=1){var a=f.create("span");a.style.cssText="cursor:pointer; margin: 10px 10px;",a.innerHTML="<a data-sign="+encodeURI(n[o])+" class='txtBtnEmotion'>"+n[o]+"</a>",m[e].ref&&(a.innerHTML="<a data-sign="+encodeURI(n[o])+" class='txtBtnEmotion'>"+m[e].ref[o]+"</a>",f.selectID("toggleWindow").style.height="50px"),a.onclick=h.attachEmotion,a.style.cssText="cursor:pointer;padding: 10px 10px:width: 50px;",t.appendChild(a)}},createImageLink:function(e){for(var t=x.createContainer(e),n=m[e].addr,i=m[e].ref,o=n.length,a=0;a<o;a+=1){var r=f.create("img");r.dataset.link=i[a],r.src=n[a],r.className="Ems",r.onclick=h.attachEmotion,r.style.cssText="width: 50px !important;height: 50px !important;",t.appendChild(r)}}},y={clear:function(){var e=f.selectID("toggleWindow");e.style.display="none";for(var t=e.childNodes,n=0,i=t.length;n<i;n+=1)t[n].style.display="none"}},b={init:function(e){y.clear();var t=u.getTarget(e);f.selectID("toggleWindow").style.display="block",f.selectID("toggleWindow").style.width=f.select("textarea").style.width;var n=t.attributes[2].nodeValue,i=t.attributes[1].nodeValue;return f.select("#eddie32"+i)?(f.select("#eddie32"+i).style.display="block",void("item1"===i?f.selectID("toggleWindow").style.height="50px":f.selectID("toggleWindow").style.height="100px")):void("plain"===n?x.createPlainText(i):"image"===n?x.createImages(i):"imageLink"===n&&x.createImageLink(i))}},E={defaultID:"emotion0000",main:function(){var e=f.create("div");e.innerHTML="<span id='largeView'></span><span class='subMenu' title='主菜单 version "+n+"'><b>⑨囧⑨</b></span>",e.id=E.defaultID;for(var t=Object.keys(m).length,i=0;i<t;i+=1){var o=Object.keys(m)[i],a=m[o].title,r=m[o].datatype,l=E.subs(a,b.init,o,r);e.appendChild(l)}var c=f.create("span");c.innerHTML="[x]",c.className="subMenu",c.id="closeEM",c.onclick=y.clear,c.style.cssText="cursor:pointer",e.appendChild(c);var d=f.create("div");d.id="toggleWindow",e.appendChild(d);var s=f.create("style");return s.innerHTML="#emotion0000 {padding:5px 5px; vertical-align: middle;                   font: 12px/16px 'Hiragino Sans GB','Microsoft YaHei','Arial','sans-serif'}                 #largeView{position:absolute; background: #fff;z-index:5000; opacity: 0.8}                 #largeView img{width: 200px; height:200px;}                 #toggleWindow a{padding: 5px 5px;line-height:2}                 #toggleWindow {height: 100px; padding: 3px 3px; overflow-x: auto; margin-top:6px;                 margin-bottom:6px; border:1px solid #ff4351; display:none;position:relative; z-index:200; }                .clickItem{display:inline-block; z-index:300;}\n                a.subBut{text-decoration: none;color: #fff;}                 .Ems{cursor:pointer;width: 50px;height: 50px;display:inline-block;  z-index:400;}                 a.subBut:hover{color: #fff;}                 a.txtBtnEmotion{text-decoration:none;}                 a.txtBtnEmotion:hover{background:#ff7680; color:#fff; }                 .subMenu{display:inline-block;cursor:pointer; text-align:center; padding: 8px 8px;                 font: 12px/16px 'Hiragino Sans GB','Microsoft YaHei','Arial','sans-serif';                background-color: #ff4351;border-color: #ff4351;color: #fff;}                 .subMenu:hover, .subMenu:focus, .subMenu:visited{background-color: #ff7680;border-color: #ff7680;color: #fff;}",e.appendChild(s),e},subs:function(e,t,n,i){var o=f.create("span");o.id=n,o.className="subMenu";var a="<a class='subBut' data-kid="+n+" date-type="+i+">"+e+"</a>";return o.onclick=t,o.title=e,o.innerHTML=a,o}};if("undefined"!=typeof window&&null!=document){var k=document.getElementsByTagName("textarea"),w=E.main();null!==document.getElementById("editor-content")&&(document.getElementById("editor-content").style.position="static");for(var L=0;L<k.length;L+=1){var I=k.item(L);I.parentNode.insertBefore(w,I)}}},o="1485412810";i(o)},{}]},{},[1]);