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

Greasy fork 爱吃馍镜像

Schlandhut

Ersetzt das rote X (Deppenkreuz) durch einen Schlandhut. Nur auf TWITTER DOT COM.

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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

公众号二维码

扫码关注【爱吃馍】

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

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     Schlandhut
// @version  1.5
// @grant    none
// @description Ersetzt das rote X (Deppenkreuz) durch einen Schlandhut. Nur auf TWITTER DOT COM.
// @include http://twitter.com/*
// @include http://*.twitter.com/*
// @include https://twitter.com/*
// @include https://*.twitter.com/*
// @namespace https://greasyfork.org/users/207156
// ==/UserScript==

function escapeRegExp(str) {
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
}

String.prototype.replaceAll = function(search, replacement) {
    var target = this;
    return target.replace(new RegExp(search, 'g'), replacement);
};

search = escapeRegExp('https://abs.twimg.com/emoji/v2/72x72/274c.png');
replace = escapeRegExp('https://pbs.twimg.com/media/DlT_Ky4XgAYjsej.png');

document.body.innerHTML = document.body.innerHTML.replaceAll(search,replace);