javascript - Tempermonkey hide class issue -


i need hide section html page:

<h1 data-ng-show="!menupinned &amp;&amp; !issaas" class="logo floatleft" aria-hidden="false"><span>xxx&nbsp;</span><span style="font-weight: bold;">xxx&nbsp;</span><span>xxxxx</span></h1> 

i tried few things nothing works:

var logo = document.queryselector('h1.logo.floatleft'); logo.style.display = "none"; 

and

document.queryselector('h1.logo.floatleft').remove(); 

interesting enough, first option, if add id h1 (hardcoded chrome devtools) , select element id, works breeze.
second option, if run command in chrome-console once, nothing happens, if run twice, h1 disappear.

i using tempermonkey, guess it's more dom-js issue (in code).

any hint welcome.

cheers, giovanni


Comments