Peaceful Twitch (without numbers / gamification)

14/09/2022, 00:07:48

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name        Peaceful Twitch (without numbers / gamification)
// @namespace   Violentmonkey Scripts
// @match       https://*.twitch.tv/*
// @grant       none
// @version     1.1
// @author      Code With Sarah
// @description 14/09/2022, 00:07:48
// @run-at      document-idle
// ==/UserScript==

  // hide viewer count for list view (and front page)
  // hide viewer count while watching a stream:
let styles = `
.iiA-dIp.side-nav-card__live-status span.CoreText-sc-cpl358-0.iUznyJ,
.front-page-carousel div.Layout-sc-nxg1ff-0.bAGmmD > p.CoreText-sc-cpl358-0:last-child {
    display: none;
}

.home-header-sticky p.CoreText-sc-cpl358-0.gVjya,
.about-section__panel--content div.Layout-sc-nxg1ff-0.imwaRG:first-child,
.ScPositionCorner-sc-1iiybo2-1:nth-child(3) .tw-media-card-stat,
[data-a-target='animated-channel-viewers-count'] {
  visibility: hidden;
}

.home-header-sticky p.CoreText-sc-cpl358-0.gVjya::before,
.about-section__panel--content div.Layout-sc-nxg1ff-0.imwaRG:first-child::before,
.ScPositionCorner-sc-1iiybo2-1:nth-child(3) .tw-media-card-stat::before,
[data-a-target='animated-channel-viewers-count']::before {
  content: '🌷🌸🌻';
  visibility: visible;
  /*
  display: block;
  position: absolute;
  left: 0;*/
  background: rgba(0,0,0,0.2);
}

.ach-card,
.quest-header,
[data-test-selector='not-completed-achievements-list'],
[data-test-selector='recently-completed-achievements-list'] {
  visibility: hidden;
}

.ach-card,
.quest-header,
[data-test-selector='not-completed-achievements-list'],
[data-test-selector='recently-completed-achievements-list'] {
  position: relative;
}

.ach-card::after,
.quest-header::after,
[data-test-selector='not-completed-achievements-list']::before,
[data-test-selector='recently-completed-achievements-list']::before {
  content: '🌷🌸🌻🌷🌸🌻🌷🌸🌻🌷🌸🌻🌷🌸🌻🌷🌸🌻🌷🌸🌷🌸🌻🌷🌸🌻🌷🌸🌻🌷🌸🌻🌷🌸🌻🌷🌸🌻🌷🌸';
  visibility: visible;
`;

let styleSheet = document.createElement("style");
styleSheet.innerText = styles;

document.head.appendChild(styleSheet);