chefkoch for minimalists

basically removes everything useless from the website

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         chefkoch for minimalists
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  basically removes everything useless from the website
// @author       cabtv
// @match        https://www.chefkoch.de/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function addGlobalStyle(css) {
        var head, style;
        head = document.getElementsByTagName('head')[0];
        if (!head) { return; }
        style = document.createElement('style');
        style.type = 'text/css';
        style.innerHTML = css;
        head.appendChild(style);
    }

    addGlobalStyle('div div img[referrerpolicy="unsafe-url"] { display: none; }'); // big ad banners everywhere
    addGlobalStyle('#vi-stories-main-container { display: none; }'); // video ad
    addGlobalStyle('.r-footer { display: none; }'); // footer
    addGlobalStyle('#recipe-comments { display: none; }'); // comments
    addGlobalStyle('div.ad { display: none; }'); // empty boxes, probably ads filtered by adblocker
    addGlobalStyle('div.rg-list, div.pi-cont { display: none; }'); // weird white space beneath comments
    addGlobalStyle('hr { display: none; }'); // useless lines
    addGlobalStyle('iframe { display: none !important; }'); // all iframes

    // remove all of sidebar right except "weitere Rezepte"
    addGlobalStyle('aside.ds-box { display: none; }'); // sidebar right
    addGlobalStyle('div.experiment-inspiration-0 aside.ds-box { display: block;}');

    // disable all ajax requests because otherwise chefkoch continues to load bullshit in the background
    XMLHttpRequest.prototype.send = function(){};

})();