Remove Share Buttons

Remove useless "trainer wheels" tracking buttons.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript== 
// @name        Remove Share Buttons
// @namespace   i2p.schimon.remove-share-buttons
// @description Remove useless "trainer wheels" tracking buttons.
// @homepageURL https://openuserjs.org/scripts/sjehuda/Remove_Share_Buttons
// @supportURL  https://openuserjs.org/scripts/sjehuda/Remove_Share_Buttons/issues
// @copyright   2024, Schimon Jehudah (http://schimon.i2p)
// @license     MIT; https://opensource.org/licenses/MIT
// @grant       none
// @run-at      document-end
// @match       file:///*
// @match       *://*/*
// @version     24.01.23
// @icon        data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48dGV4dCB5PSIuOWVtIiBmb250LXNpemU9IjkwIj7wn6qk77iPPC90ZXh0Pjwvc3ZnPgo=
// ==/UserScript==

var cssSelectors;

cssSelectors = [
  '/submit?url=',
  '/sharer.php?u=',
  '/intent/tweet?text=',
  '/pin/create/button/?url=',
  '://send?text=',
  '/pin/create/button?url=',
  '/sharing/share-offsite/?url=',
  '/mail/?view=',
  '/sharer/sharer.php?u=',
  '/share?url=',
  'app.com/send?text=',
  'gab.com/compose?url=',
  'n.com/shareArticle?',
  'r.com/share',
  'x.com/share',
  'wp.me/',
  ];

for (const cssSelector of cssSelectors) {
  let links = document.querySelectorAll('a[href*="' + cssSelector + '"]');
  for (const link of links) {
    link.remove();
  }
}

cssSelectors = [
  '/plugins/like.php?href=',
  ];

for (const cssSelector of cssSelectors) {
  let links = document.querySelectorAll('iframe[src*="' + cssSelector + '"]');
  for (const link of links) {
    link.remove();
  }
}

switch (location.hostname) {
  case "creation.com":
    cssSelectors = ".share-bar";
    break;
  case "notthebee.com":
    cssSelectors = ".article-shareables";
    break;
}

document.querySelector(cssSelectors).remove();