|
|
本帖最后由 QuaintJade 于 2013-6-12 21:32 编辑
我觉得百度贴吧程序员大概都是CSS美工出身的,新版代码简直是一塌糊涂
漏洞就不说了,源代码里面加的注释都大摇大摆地放在那里- follow_sign:"6b9484948ee14a64", forward_sign:"29c6338c26d7deb2", member_status : 5, forum_name_hj:"test", tbs_loaded:1,// 原来的tbs由异步获取,现改为用UI获取,需要此参数禁止异步的使用 by owen
- first_class:"文学", second_class:"当代其他文学作品", ecom_sid:"", show_cpro:"1", page_id : 1, fixedwidth : 1, page : 'pb', frs_version : "", is_newfrs_stats:0, TB_JSCSSTAG : 1222222, is_last_page:"1",//是否为最后一页,RP尾页底侧推荐使用
- is_lzl:"1",
- staticDomain:"http://static.tieba.baidu.com/",
- ecomStatDomain:"http://bzclk.baidu.com/",
- ecomExp : "",//贴吧推广向ecom发送统计请求所需参数
复制代码- //缩放图片的方法需要放在前面,因为有onload
- //common里也有这个方法,但是common里有setTimeout的判断,在IE下会导致内存占用很大
- function resizePic_temp(o, Mw, Mh, need_margin) {
- var _Mw = Mw || 120;
- var _Mh = Mh || 120;
- var need_resize = false;
- var _image = new Image();
- _image.src = o.src;
- function getRightWH(Rw, Rh, Mw, Mh) {
复制代码- //由于吧刊贴里有Fe.resizePic这个方法,所以这里加上
- var Fe = Fe || {};
- Fe.resizePic = resizePic_temp;
- //签名档加载失败处理
- function sign_change_img(img){img.src='http://tb1.bdstatic.com/tb/static-itieba/img/sign_err.png';img.width=100;img.height=25;}
- </script>
复制代码- //气泡提示
- var repost_b_option = {
- "content" : "转发贴子到你喜欢的吧", // 气泡内容
- "arrow_dir" : "left", // left right
- "bubble_css" : { // 气泡的样式定义,
- "top" : -2, // 相对于其父元素的定位,限制是其父元素的position
- // 属性需为relative或者absolute属性
- "right" : 110,
- "width" : 140
- },
- "arrow_pos" : { // css 设置 气泡的箭头
- "top" : 8
- },
- "attr" : "class='repost_btn_tip'", // 给气泡添加的属性
- "wrap" : $("#j_p_postlist").find(".repost_thread"), // 气泡的容器
- "closeBtn" : true , // 是否展现关闭按钮
- "level" : 1, // 气泡优先级 默认是1 值从1-10
- "arrowReq" : true // 是否需要气泡 默认为true
- };
- var repost_bubble = new UiBubbleTipBase(repost_b_option);
- if($.cookie("repost_btn_tip") != "1") {
- repost_bubble.showBubble();
- }
- repost_bubble.bind("onclose", function(){ // 点击关闭按钮时执行的回调
- repost_bubble.closeBubble(); // 直接销毁气泡
- $.cookie("repost_btn_tip", "1", {expires:30});
- });
- </script>
- <script>
- // @yangzeming 兴趣大师
- PageData.interestman = {"is_interestman_thread":0,"interestman_vote_num":0,"interestman_rank_no":0,"left_interestman_thread_num":0,"left_interestman_pc_num":0,"left_interestman_wap_num":0,"left_interestman_client_num":0,"left_interestman_num":0,"plan_image":"","qrcode":""};
- //贴子列表
- _.Module.use("pb/widget/ForumListV3");
- // url 安全检测 by tanjiawei
- _.Module.use('pb/component/UrlCheck');
- </script>
- <script>
- _.Module.use('pb/component/Pager', ["thread_theme_4", "jumpPage3"]);
- </script>
- <script>
- PageData.user.is_like = 1;//是否已like本吧
- PageData.user.is_block = 0;//是否已封禁
- PageData.is_sign_in = 1; //今日是否已经签到
- PageData.forum.version = 2;
- PageData.is_star = 0;
- PageData.memberTitle = "";
- PageData.memberNumber = "0";
- Sign_rank.sign_init();
- Sign_rank.pvLog(); //统计推广链接点击数
- </script>
复制代码- var option_editor = {
- url:"/f/commit/post/add", // 提交数据的url
- editorDom: "editor", // 整个容器
- tpl_id : "j_editor_tpl", // html的模版
- userInfo :{user:PageData["user"],user_name:"kaspersky002"}, // 用户信息
- tbs : PageData["tbs"], // tbs
- media_conf : media_conf, // 编辑器中允许的图片数
- page : "pb",
- header : "发表回复",
- is_block: PageData.user.balv.is_block ? true : false,
- no_un : PageData["user"]["no_un"],
- no_post_pic: 0,
- c_sign_num : 1,
- is_ipad : PageData.is_ipad,
- post_type: "reply",
- captcha_after_post: true,
- can_local_upload : "1",
- captcha_grid: true,
- picasso:PageData["user"]["picasso"]?true:false,
- bavl : bavl_is_like,
- isPb : true,
- thread_topic_type : thread_topic_type, //贴子类型:话题贴、图片话题贴、直播贴 add by ydw 2012-11-21
- // 趣味表情小流量
- interestSmiley : "1",
- thread_topic_subtype : thread_topic_subtype
-
- };
复制代码- <script>
- //清除统计产生的cookie,下周就下线。因此作为临时代码,放在这里
- (function(){
- var cookieNames = [
- 'Hm_lvt_81b725ba85f995f59af2ff993ec60080',
- 'Hm_lvt_85a700f41c96a7f9a3f60ac45ee3427d',
- 'Hm_lvt_bbe3bf928d393246063782a752d457c2',
- 'Hm_lvt_a65719f5db58fd0b9cd5bf6f9194e7a7',
- 'Hm_lvt_d23134731074c1581121c9e02316bb63',
- 'Hm_lvt_498cd03c0301bf777c1383c56d2b1f80',
- 'Hm_lvt_d9482ec80b299b9d18757a5b78dfd65f',
- 'Hm_lvt_20e9dfe35cbd1bca6788ae811f2a086e',
- 'Hm_lvt_83dc6b70217deaf63099a5f2e5e830b9',
- 'Hm_lvt_47c724eb449eff0470467602f27fd677',
- 'Hm_lvt_31e8cbc060fb22b8595f909097b73f4c',
- 'Hm_lvt_539d3ab18e2c8b94d39b6ae5c93c9fc0',
- 'Hm_lvt_5d4f65395d22ec798d492d42987ec11f',
- 'Hm_lvt_1b431f7f366e50f33a66a06cbf1c908e',
- 'Hm_lvt_ee25564ae573ca3aa9c0e9829da0c7b5',
- 'Hm_lvt_a80de6615fcb7b769a8917b6e5a4290a',
- 'Hm_lvt_820704f32c728d897642fb9a4d869fc5',
- 'Hm_lvt_c21d3e460de192a1559a4e4cdefb0c13',
- 'Hm_lvt_d0c5e23925789c95e37b71a9d7195c3b',
- 'Hm_lvt_d1e473094ed359f5106beb7b5fa8fa8b',
- 'Hm_lvt_058b6795c89166dd5e80c7f9a1f62547',
- 'Hm_lvt_2b4e53dc800143fa5361510c893e6098',
- 'Hm_lvt_a44d7035be42e3a9c3c2df3c9c2fae86',
- 'Hm_lvt_73dca03586694a616c988dcf7fa67e11',
- 'Hm_lvt_28a34d8be9c4b984b9bb2e70a3239859',
- 'Hm_lvt_4d5297d5efe1ac2e0c4099cb7437d52e',
- 'Hm_lvt_569e237a97a21569dd875188e01effe0',
- 'Hm_lvt_8270f67c17ce08c6a1f06f6c1bb655d2'
- ];
- for(var i in cookieNames){
- var cn = cookieNames[i];
- $.cookie(cn, null, {path : '/'});
- $.cookie(cn, null);
- }
- })();
- </script>
复制代码 |
|