Fuck Pinterest

Filter that shit out of my searches!

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

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

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

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

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

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Fuck Pinterest
// @namespace    https://www.google.com
// @version      0.1
// @description  Filter that shit out of my searches!
// @author       martixy
// @match        https://www.google.com/*
// @grant        none
// @copyright    2016+, martixy
// ==/UserScript==
/* jshint -W097 */
//'use strict';

//Note: The URL filter can't match just country-specific domains (https://developer.chrome.com/extensions/match_patterns)
//so if you use google on a TLD other than .com, change the match to your preferred TLD
//(e.g. https://www.google.com/* -> https://www.google.co.uk/*)

//Blocking the site itself can be done with any adblocker out there.

var urlParams = new URLSearchParams(window.location.search);
if ((q = urlParams.get('q')) !== null && q.indexOf('pinterest') === -1) {
    urlParams.set('q', q + ' -site:pinterest.*');
    window.location.search = urlParams.toString();
}