菊花文代码:
var tmp = {},
lzl = (window.LzlEditor && window.LzlEditor._lzl ? window.LzlEditor._lzl.mainData : {}),
ti = PageData.thread;
tmp.ti = ti ? ti.title : prompt("输入贴子标题");
tmp.tid = ti ? ti.thread_id : 0;
tmp.co = prompt((lzl.floor_num ? ("回复『" + lzl.floor_num + "』楼\n") : "") + (lzl.user_name ? ("回复【" + lzl.user_name + "】:") : "输入回复内容"));
if (tmp.co) {
tmp.co = A2W((lzl.user_name ? ("回复 " + lzl.user_name + " :") : "") + tmp.co);
function A2W(s){
var r= "" ;
for (var i=0;i<s.length;i++){
r+=s.charAt(i)+'\u0489'};
return r};
$.post ("
http://tieba.baidu.com/f/commit/" + (ti ? "post" : "thread") + "/add", {
kw: decodeURIComponent(PageData.forum.name_url.split("&")[0]),
ie: "utf-8",
rich_text: 1,
floor_num: 1,
quote_id: (lzl.pid ? lzl.pid : 0),
fid: PageData.forum.id,
tid: tmp.tid,
title: tmp.ti,
content: tmp.co,
anonymous: 0,
tbs: PageData.tbs},
function(o) {
if (o.no!=0)
alert ("no:"+o.no+"\nerr_code:"+o.err_code+"\nerror:"+o.error);
else
location.reload() },"json")}