Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saratheneale/d2b2705b8e57f7bebd8e502cf325b47a to your computer and use it in GitHub Desktop.
Save saratheneale/d2b2705b8e57f7bebd8e502cf325b47a to your computer and use it in GitHub Desktop.
fix nytcooking recipe site
// ==UserScript==
// @name NYT Cooking
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://cooking.nytimes.com/recipes/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Remove everything with role=dialog
let dialogList = document.querySelectorAll('[role="dialog"]');
for(let i = 0; i< dialogList.length; i++){
let temp = dialogList[0];
temp.remove();
}
//Add scroll to body.
document.getElementsByTagName("body")[0].style.overflow = "scroll";
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment