Search code examples
javascriptbookmarks

applying Javascript on current page using bookmark bar


I am trying to apply JavaScript on the page displayed on the browser using the bookmark bar, just like method explained in this link : https://www.tecdrop.com/iseepass/

I want to hide something in the page, and I tried this code

javascript:(function(){
document.getElementsById("someTable").style.display = 'none';
document.getElementsById("someTable").style.visibility = 'hidden';
})();

but this did not work.

BTW: object with ID someTable exist in the page I tried with.


Solution

  • document.getElementsById doesn't exists. It's getElementById https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById