🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

Greasy Fork is available in English.

📂 缓存分发状态(共享加速已生效)
🕒 页面同步时间:2026/01/08 13:58:09
🔄 下次更新时间:2026/01/08 14:58:09
手动刷新缓存

click x button to remove a post for PC and mobile tumblr

点击x按钮移除一个tumblr帖子

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

// ==UserScript==
// @name         click x button to remove a post for PC and mobile tumblr
// @description  点击x按钮移除一个tumblr帖子
// @version      0.1
// @include      http://*.tumblr.com/*
// @include      https://*.tumblr.com/*
// @author       yechenyin
// @namespace    https://greasyfork.org/users/3586-yechenyin
// @require  	   https://code.jquery.com/jquery-1.11.2.min.js
// ==/UserScript==

jQuery.fn.inserted = function(action) {
  var selector = this.selector;
  if ($(selector).length > 0) {
    console.log($(selector).length + ' ' + selector + " is loaded at begin");
    action.call($(selector));
  }
  var reaction = function(records) {
    records.map(function(record) {
      if (record.target !== document.body && $(record.target).find(selector).length) {
        if (record.target.id)
          console.log('#' + record.target.id + ' which contains ' + selector + ' is loaded');
        else if (record.target.className)
          console.log('#' + record.target.className + ' which contains ' + selector + ' is loaded');
        else
          console.log('#' + record.target.tagName + ' which contains ' + selector + ' is loaded');
        //if (trigger_once)
        //observer.disconnect();
        action.call($(record.target).find(selector));
      }
    });
  };

  var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
  if (MutationObserver) {
    var observer = new MutationObserver(reaction);
    observer.observe(document.body, {
      childList: true,
      subtree: true
    });
  } else {
    //setInterval(reaction, 100);
  }
};

if ($('body').hasClass('is_mobile')) {
$('head').append($('<style>', {
  class: 'close_button_css',
  text: `
            .post-close:before {
                content: "\\EA1E";
                font-family: tumblr-icons,Blank;
                -webkit-font-smoothing: antialiased;
                -moz-osx-font-smoothing: grayscale;
                font-smoothing: antialiased;
                text-rendering: optimizeLegibility;
                font-style: normal;
                font-variant: normal;
                font-weight: 400;
                text-decoration: none;
                text-transform: none;
            }.post-close {
                position: absolute;
                top: 10px;
                right: 14px;
                opacity: 0.3;
                width: 20px;
                height: 20px;
                font-size: 24px;
                line-height: 1;
                overflow: hidden;
                text-decoration: none;
            }
              `
}));

  $('.mh_post_page').inserted(function() {
    $(this).find(".mh_post_head").append($('<a class="post-close"></a>').click(function() {
        $(this).parent().parent().remove();
    }));
  });
} else {
$('head').append($('<style>', {
  class: 'close_button_css',
  text: `
            .post-close:before {
                content: "\\EA1E";
                font-family: tumblr-icons,Blank;
                -webkit-font-smoothing: antialiased;
                -moz-osx-font-smoothing: grayscale;
                font-smoothing: antialiased;
                text-rendering: optimizeLegibility;
                font-style: normal;
                font-variant: normal;
                font-weight: 400;
                text-decoration: none;
                text-transform: none;
            }.post-close {
                position: absolute;
                top: -2px;
                right: 10px;
                opacity: 0.3;
                width: 20px;
                height: 20px;
                font-size: 20px;
                line-height: 1;
                overflow: hidden;
                text-decoration: none;
            }
              `
}));

  $(".post_wrapper, .post_container").inserted(function() {
    $(this).find(".post_header").append($('<a class="post-close"></a>').click(function() {
        $(this).parent().parent().parent().parent().remove();
    }));
  });
}