chefkoch for minimalists

basically removes everything useless from the website

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 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(){};

})();