I'm trying to remove a div from this page with TamperMonkey.
This code works well with chrome DevTools console
var elems = document.getElementsByClassName('hdn hdb-m hfl-m');
elems[0].parentNode.removeChild(elems[0]);
but doesn't work with TamperMonkey
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var elems = document.getElementsByClassName('hdn hdb-m hfl-m');
elems[0].parentNode.removeChild(elems[0]);
})();
What am I missing?