Remove Threads link and red badge on instagram.com

Removes the div with the href https://www.threads.net/ on instagram.com without using the class xdy9tzy

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name     Remove Threads link and red badge on instagram.com
// @version  1.0
// @description  Removes the div with the href https://www.threads.net/ on instagram.com without using the class xdy9tzy
// @author    Jonathan Woolf
// @match    https://www.instagram.com/*
// @grant    none
// @license  Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
// @namespace https://greasyfork.org/users/1008047
// ==/UserScript==

(function() {
'use strict';

// Get the div to remove
var divToRemove = document.querySelector('a[href="https://www.threads.net/"]').parentNode.parentNode;

// Remove the div if it exists
if (divToRemove) {
divToRemove.parentNode.removeChild(divToRemove);
}
})();