bilibilibar

为吧主管理提供便捷功能

目前為 2016-07-08 提交的版本,檢視 最新版本

// ==UserScript==
// @name         bilibilibar
// @namespace    https://gf.qytechs.cn/zh-CN/scripts/21000-bilibilibar
// @version      0.1.1
// @description  为吧主管理提供便捷功能
// @author       winoros
// @match        http://tieba.baidu.com/p/*
// @grant        none
// ==/UserScript==

(function() {
    var star_navs = $('.star_nav_tab');
    if(star_navs.length > 0) {
        star_navs.last().removeClass('none_right_border');
        $('<li><a href="#" id="quick_replay_and_delete" class="star_nav_tab">回复并删帖</a></li>').insertAfter($('.star_nav_tab').last());
    } else {
        $('<li><a href="#" id="quick_replay_and_delete" class="l_lzonly">回复并删帖</a></li>').insertAfter($('.j_tbnav_tab').last());
    }
    $('#quick_replay_and_delete').on('click', function() {
        $.post('http://tieba.baidu.com/f/commit/post/add', {'ie': 'utf-8', 'kw': PageData.forum.forum_name, 'fid': PageData.forum.forum_id,
                                                            'tid': PageData.thread.thread_id, 'rich_text': 1, 'tbs': PageData.tbs,
                                                            'content': '此贴将被删除,所求助内容请看置顶帖,谢谢', 'files': [], '_type_': 'reply'}, function(data) {
          console.log(JSON.parse(data));
          if(JSON.parse(data).no !== 0) {
            alert('回复不能了喵~');
          } else {
            $.post('http://tieba.baidu.com/f/commit/thread/delete', {'ie': 'utf-8', 'commit_fr': 'pb', 'kw': PageData.forum.forum_name,
                                                                     'fid': PageData.forum.forum_id,
                                                                     'tid': PageData.thread.thread_id, 'rich_text': 1, 'tbs': PageData.tbs}, function(data) {
              if(JSON.parse(data).no !== 0) {
                alert('删帖不能了喵~');
              } else {
                alert('删帖成功了喵~');
              }
            });
          }
        });
    });
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址