Skip to content

Instantly share code, notes, and snippets.

@cha0s
Last active October 22, 2017 02:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cha0s/6786edc05d56fd5f4d927df954250737 to your computer and use it in GitHub Desktop.
Save cha0s/6786edc05d56fd5f4d927df954250737 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Fuck yummly
// @namespace yummly
// @include https://www.yummly.com/recipe/*
// @version 1
// @grant none
// ==/UserScript==
var loop = true, clicked = 0;
var reactId = null;
(function redirectToActualSite() {
var elm;
elm = document.querySelector('.recipe-show-full-directions');
if (elm) {
if (!reactId) {
reactId = elm.dataset.reactid;
}
if (reactId != elm.dataset.reactid) {
clicked++;
}
if (clicked < 2) elm.click();
}
elm = document.querySelector('.recipe-show-full-directions a.out-link');
if (elm) {
var url = elm.protocol + '//' + elm.hostname + elm.pathname;
window.location = url;
loop = false;
}
if (loop) setTimeout(redirectToActualSite, 50);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment