Selectively printing elements on web page using a bookmarklet
Declare variables before using them - your node variable is never declared. Use let node = instead.
Typo? node.classList.remove.(t_class) should be node.classList.remove(t_class);
Variable casing The vast majority of professional JavaScript uses camelCase for most variables, including parameters. There are a few exceptions (like ALL_CAPS for things like constant magic numbers, and PascalCase for constructors and namespaces).
Variable names It's not entirely clear on the initial encounter of removeClass what the parameters mean. Maybe change:

t_selector -&gt; selectorToShow
t_class -&gt; hiddenClassName

or something similar.
Always use strict equality, avoid sloppy equality to avoid readers of the code having to understand coercion weirdness to be 100% confident of what the code is doing.
Semicolons Either use semicolons when appropriate, or (if you don't like them and you're an expert who can avoid the pitfalls of ASI) don't. To be stylistically consistent, choose one style and stick with it. Consider a linting rule.
Relying on a site's classes is unreliable, especially for sites that are being actively maintained and developed. Many of those who write bookmarks and userscripts are familiar with this issue. The site may change their CSS, resulting in d-print-none doing nothing. Bookmarklets and userscripts are prone to requiring updates when a site changes regardless - but reducing the chance of needing maintenance when a change occurs is good.
Whatever d-print-none does currently, I'd append another &lt;style&gt; tag that inserts your own class (or data attribute) that does the same thing, eg:
const style = document.body.appendChild(document.createElement('style'));
style.textContent = `
@media print
{    
    .melted-bookmarklet-print-none, .melted-bookmarklet-print-none *
    {
        display: none !important;
    }
}
`;

Then toggle that class instead (and do style.remove() at the end if you want).
(You might be tempted to iterate through the elements and apply the style directly to elements, but that could break the site's built-in display properties if it happens to have styles already applied directly to elements.)
Or, you could use CSS alone instead of iterating through elements. How exactly to do this depends on where the app-flex-chart and app-flex-grid are located on the page, but it could look something like this, if they're both descendants of the &lt;body&gt;:
const style = document.body.appendChild(document.createElement('style'));
style.textContent = `
@media print
{    
    body &gt; *:not(app-flex-chart):not(app-flex-grid),
    body &gt; *:not(app-flex-chart):not(app-flex-grid) * {
        display: none !important;
    }
}
`;

(feel free to engineer to be more flexible and less repetitive if you think it'd be helpful)
This way, all elements which are not the .app-flex-chart nor .app-flex-grid will be hidden, without any intermediate classes or element iteration.
Or save a reference to the two elements you want to print, remove everything, then append the two back:
const elms = ['app-flex-chart', 'app-flex-grid'].map(s =&gt; document.querySelector(s));
document.body.textContent = '';
for (const elm of elms) {
  document.body.appendChild(elm);
  // if needed to put them on separate lines:
  document.body.appendChild(document.createElement('div'));
}

That's the version I'd prefer, if feasible. You may have to insert intermediate elements for the page's styles to apply. (If that gets too complicated, use a different approach.) If you want the original page to remain interactable, you could open a new window which gets populated with the content of elms instead. (You'll also have to append &lt;style&gt; and CSS link tags from the original page)
Bookmarklet or userscript? You're currently using this as a bookmarklet. It depends how you're managing them, but if you aren't using a special utility for it, I think userscripts are more maintainable, due to a few factors:

Userscript editor interfaces are meant to be usable as code editors. In contrast, a bookmarklet, when installed, isn't very user-friendly to edit:


Userscripts can be saved in separate external files, rather than existing in the browser's internal ether.

Userscripts are more flexible in when they're run. Most importantly, they can run automatically without requiring a click. You may find this helpful.


If you want to try this out as a userscript, try Tampermonkey.
Depending on how you're using the printed page and how often you're printing, you can consider using Puppeteer in Node to scrape and print the elements completely automatically.