Skip to content

Instantly share code, notes, and snippets.

@g-rohit
Created December 5, 2024 06:39
Show Gist options
  • Save g-rohit/a170bae0ce2e1483c08b2e25be64e068 to your computer and use it in GitHub Desktop.
Save g-rohit/a170bae0ce2e1483c08b2e25be64e068 to your computer and use it in GitHub Desktop.
Removes sponsor ads on the MoneyControl mutual funds page.
// ==UserScript==
// @name Remove Sponsor Ads
// @namespace http://tampermonkey.net/
// @version 2024-12-05
// @description Removes sponsor ads on the MoneyControl mutual funds page.
// @author You
// @match https://www.moneycontrol.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=moneycontrol.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Select and remove all <tr> elements with the specified classes
document.querySelectorAll('tr.sponsor_ad_bg, tr.sponsor_ad_bg_slider, tr.sponsor_ad_bg_slider0')
.forEach((row) => row.remove());
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment