dcDel

2021. 1. 2. 오후 9:43:11

当前为 2021-01-02 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        dcDel
// @namespace   Violentmonkey Scripts
// @match       https://gall.dcinside.com/mgallery/board/lists
// @grant       none
// @version     1.3
// @author      -
// @description 2021. 1. 2. 오후 9:43:11
// ==/UserScript==
var colg = $("colgroup")[0].children[0], th = $("thead")[0].children[0].children[0];
if(colg.getAttribute('style') == 'width:3%') {
  colg.remove();
  th.remove();
}

var issue = $(".ub-content");
for(var i=0; i<issue.length; i++) {
  if(issue[i].children[3].getAttribute('user_name') == '운영자') {
    issue[i].remove();
  }
}

$(document).on("contextmenu",function(e){
	var x, y, ElementPointNo;
  x = e.pageX - document.scrollingElement.scrollLeft;
  y = e.pageY - document.scrollingElement.scrollTop;
  ElementPointNo = $(document.elementFromPoint(x, y)).closest("tr")[0].getAttribute('data-no');
  console.log(x+", "+y);
  console.log(ElementPointNo);
  del_custom(ElementPointNo);
});

function del_custom(no) {
  var allVals = Array();
    
  allVals.push(no);

  if(confirm("선택한 게시물을 삭제하시겠습니까?")){

      $.ajax({
          type : "POST",
          url : "/ajax/"+ get_gall_type_name() +"_manager_board_ajax/delete_list",
          data : { 'ci_t': get_cookie('ci_c'), 'id': $.getURLParam('id'), 'nos': allVals ,_GALLTYPE_: _GALLERY_TYPE_ },
      dataType : 'json',
          cache : false,
          async : false,
          success : function(ajaxData) {
        if(typeof(ajaxData.msg) != 'undefined' && ajaxData.msg) {
          alert(ajaxData.msg);
        }

        if(ajaxData.result == "success") {
          //location.reload(true);
        }
          },
          error : function(data) {
             alert('시스템 오류로 작업이 중지되었습니다. 잠시 후 다시 이용해 주세요.');
          }
      });
  }
}