I am trying to hide "Add to Cart" and "Buy Now" buttons on shopping websites that a user might visit. Following is my code, it works great on Amazon India but does not on any other website. I am trying to hide the span ID but would like to know how can we hide the button type or input action?
// ==UserScript==
// @name Google - Amazon Shopping Button Disappear
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Make the shopping button disappear in Amazon.In when a page is loaded
// @author Wipro
// @match http://*/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @grant none
// ==/UserScript==
$("span.a-button-inner")
.hide ();
I have also tried the following with no luck.
document.getElementById('button').style.visibility = "hidden";
Regards, Shrey