$('.subbtn_bg[value=" 发 表 "]').click();
break;
case '3':
color1 = '<span class=\"apc_src_wrapper\">';
color2 = '</span>';
space += " ";
break;
case '4':
color1 = '<font color=\"#E10602\">';
color2 = '</font>';
break;
case '7':
color1 = '<span class="edit_font_color"><strong>';
color2 = '</strong></span>';
break;
case '9':
color1 = '<strong>';
color2 = '</strong>';
break;
}
var cnt = $("#edit_parent").find("div.tb-editor-editarea").html();
cnt = cnt + "<br><br><br><br><br>";
//获得选中尾巴并保存当前值
var st = 0; //selecttail脚标
for (var j = 0; j <= tails.length; j++) {
if ($('#mytail' + j).attr('checked') == 'checked') {
GM_setValue('currenttail', GM_getValue('currenttail') + j + '|');
selecttail[st] = tails[j];
st++;
}
}
//GM_setValue('currenttail',GM_getValue('currenttail').slice(0,GM_getValue('currenttail').length-1));
//判断设定空格长度
var spacelength = selecttail[0].length;; //空格长度
for (var j = 0; j < selecttail.length; j++) {
var tailtf = selecttail[j];
var tailtemp = tailtf.length;
var smallchar = 1;
for (var i = 0; i < tailtf.length; i++) {
if (tailtf[i].charCodeAt(0) <= 256) smallchar++;
}
for (var i = 1; i <= smallchar; i++) {
if (i % 2 == 0) tailtemp--;
}
if (spacelength < tailtemp) spacelength = tailtemp;
}
if (spacelength < lh) {
for (var i = 0; i < lh - spacelength; i++) {
space += " ";
}
}
if (style == 7 || style == 9) space = space.slice(0, space.length - 4);
for (var i = 0; i < selecttail.length; i++)
{
selecttail[i] = color1 + space + "————" + selecttail[i] + color2;
cnt += selecttail[i] + (style==3?"":"<br>");
}
if(style==3)
{
cnt+='<img class="BDE_Image" width="1" height="1" src="
http://imgsrc.baidu.com/forum/pic/item/4a50db03918fa0ecbbe378e8269759ee3c6ddbab.jpg" pic_type="3">'
}
$("#edit_parent").find("div.tb-editor-editarea").html(cnt);
$('.subbtn_bg[value=" 发 表 "]').click();
}
//事件监听
var f = document.getElementById("Tail");
f.addEventListener("click", Tail, false);
var m = document.getElementById("adittail");
m.addEventListener("click", adittail, false);
//快捷键 shift+enter
document.onkeydown = hotkey;
function hotkey(event) {
if (event.shiftKey && event.keyCode == 13) {
if ($("#edit_parent").find("div.tb-editor-editarea").is(":focus")) Tail();
}
}
$('#floatedit').css({
'width': '600px',
'height': '300px',
'color': '#8FC844',
'background': '#F3EFE3',
'border': '3px #FF7F3E solid'
});
$('#float').css({
'position': 'fixed',
'bottom': '40%',
'left': '25%',
'width': '600px',
'height': '300px',
'z-index': '9999999',
'CURSOR': 'hand',
'display': 'none'
});
$('#slectbox').css({
'position': 'absolute',
'right': '6px',
'display': 'inline',
'width': '150px',
'background': '#red',
'border': '1px grey',
'z-index': '9999999'
});
$('#option-box').css({
'display': 'none',
'border': 'none'
});
$('#slect-in').css({
'text-align': 'left',
'font-size': '18px',
'color': '#FF7F3E'
});
$('#option-box a').css({
'text-align': 'center',
'font-size': '18px',
'color': '#FF7F3E'
});
$('#reply').css({
'position': 'relative',
'left': '5px'
});