Greasy Fork

来自缓存

Greasy Fork is available in English.

Pinterest with no registration modal popup

Allows to browse Pinterest without login/registration, removing the offending modal popup

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        Pinterest with no registration modal popup
// @namespace   jesusmg
// @version     2.5
// @description Allows to browse Pinterest without login/registration, removing the offending modal popup
// @include     http://*.pinterest.com/*
// @include     https://*.pinterest.com/*
// @include     https://*.pinterest.*/*
// @author	    Jesús González
// @require     http://code.jquery.com/jquery-latest.min.js
// @require 		http://greasyfork.icu/scripts/6250-waitforkeyelements/code/waitForKeyElements.js?version=23756
// ==/UserScript==

$(document).ready(function() { 
  setInterval(function() {
    if ($("div[data-reactcontainer='']").is(':empty')) {
  		console.log("Page is empty, reloading");
      location.reload();
		}
  }, 1000);
  
  
    waitForKeyElements (
  //"iframe[title='fb:login_button Facebook Social Plugin']", hideElement
  "iframe", removeElement  
  );

  waitForKeyElements (
    "div[data-test-id='signup']", removeElement
  );

  waitForKeyElements (
    "div[data-test-id='fullPageSignupModal']", removeElement
  );

  waitForKeyElements (
      "div[data-test-id='giftWrap']", removeElement
  );

  /*
  waitForKeyElements (
    ".FullPageModal__scroller", removeParent
  );
  */
});

function hideElement(jNode) {
	console.log("Hiding offending registration crap");
	console.log(jNode);  
  jNode.css('visibility', 'hidden');
  
}

function removeElement(jNode) {
	console.log("Removing offending registration crap");
	console.log(jNode);
  
  jNode.remove();
}

function removeParent(jNode) {
  removeElement(jNode.parent());
}

function removeElementDelayed(jNode) {
  setTimeout(removeElement(jNode), 3000);
}