Mint - Remove Ads

removes annoying and inconspicuous ads from Mint

目前為 2021-06-28 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Mint - Remove Ads
// @namespace    https://openuserjs.org/users/zachhardesty7
// @author       Zach Hardesty <[email protected]> (https://github.com/zachhardesty7)
// @description  removes annoying and inconspicuous ads from Mint
// @copyright    2019, Zach Hardesty (https://zachhardesty.com/)
// @license      GPL-3.0-only; http://www.gnu.org/licenses/gpl-3.0.txt
// @version      1.1.4

// @homepageURL  https://github.com/zachhardesty7/tamper-monkey-scripts-collection/raw/master/mint-clean-ui.user.js
// @homepageURL  https://openuserjs.org/scripts/zachhardesty7/Mint_-_Remove_Ads
// @supportURL   https://github.com/zachhardesty7/tamper-monkey-scripts-collection/issues


// @include      https://mint.intuit.com*
// @exclude      https://mint.intuit.com/save.event
// @require      https://greasyfork.org/scripts/419640-onelementready/code/onElementReady.js?version=887637
// ==/UserScript==
/* global onElementReady */

/* css hiding */
const main = () => {
  const styles = `
    /* feedback modal */
    .QSIPopOver.SI_6RSOI27plGNzMeV_PopOverContainer {
      display: none !important;
    }

    /* right help widget */
    .nr-side-widget {
      display: none !important;
    }

    .adviceWidget {
      display: none !important;
    }

    .feedbackWidget {
      display: none !important;
    }

    /* bills page feedback widget */
    .FeedbackView {
      display: none !important;
    }

    /* homepage ad */
    .promotions-personalized-offers-ui {
      display: none !important;
    }
  `

  const stylesheet = document.createElement("style")
  const head = document.head || document.querySelectorAll("head")[0]
  stylesheet.type = "text/css"
  stylesheet.append(document.createTextNode(styles))
  head.append(stylesheet)
}

/* dynamic hiding */
// hide account status bar (if robinhood text included)
onElementReady(
  ".AccountStatusBarItemView .status.error",
  { findOnce: false },
  (el) =>
    el.textContent.includes("Robinhood") &&
    document.querySelector(".AccountStatusBarView").remove()
)

main()