Wyborcza Tweaks

Zastępuje wideo przyciskiem "kliknij aby obejrzeć film", przywraca kolor górnego paska na biały.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name Wyborcza Tweaks
// @description Zastępuje wideo przyciskiem "kliknij aby obejrzeć film", przywraca kolor górnego paska na biały.
// @namespace wyborczapl.usability
// @license MIT
// @copyright claperius https://github.com/claperius
// @version  3
// @include http://wyborcza.pl
// @include https://wyborcza.pl
// @include http://wyborcza.pl/*
// @include https://wyborcza.pl/*
// @include http://*.wyborcza.pl/*
// @include https://*.wyborcza.pl/*
// @include http://wyborcza.biz/*
// @include https://wyborcza.biz/*
// @include http://*.wysokieobcasy.pl/*
// @include http://wysokieobcasy.pl/*
// @include https://*.wysokieobcasy.pl/*
// @include https://wysokieobcasy.pl/*
// @grant none
// ==/UserScript==



function removeVideos() {
    var placeholder = document.createElement('div');
    placeholder.textContent = "Kliknij aby obejrzeć film";
    placeholder.style.setProperty("padding", "50px");
    placeholder.style.setProperty("margin", "auto");
    placeholder.style.setProperty("width", "100%");
    placeholder.style.setProperty("text-align", "center");
    placeholder.style.setProperty("border", "solid 1px #C0C0C0");
    placeholder.style.setProperty("background", "#F8F8F8");
    placeholder.style.setProperty("cursor", "pointer");

    var docs = document.getElementsByClassName('wyborcza-player');

    function onPlaceholderClick(e) {
        var num = e.currentTarget.getAttribute("number");
        docs[num].style.setProperty('display', 'block');
        e.currentTarget.remove();
    }

    for(var i=0; i< docs.length; i++) {
        var doc = docs[i];
        placeholder.setAttribute("number", i);
        placeholder.addEventListener('click', onPlaceholderClick);
        doc.after(placeholder);
        doc.style.setProperty('display', 'none');
    }
}

function bringColorsBack() {
  var wh = document.getElementById('wH_container');
  var ht = document.getElementById("wyborczaHat");

  ht.style.setProperty("color", "black");
  ht.style.setProperty("background-color", "white");

  wh.style.setProperty("color", "black");
  wh.style.setProperty("background-color", "white");
}

function changeColorsWithTimeout() {
    for (var timeout=1000; timeout <= 3000; timeout += 1000) {
        window.setTimeout(bringColorsBack, timeout);
    }
}

changeColorsWithTimeout();
removeVideos();