Answer the question
In order to leave comments, you need to log in
How to use js to know if a page is open in a new tab?
How to use js to know if a page is open in a new tab?
And, if it's not difficult for you to write a script, then how to assign the value style="display: none" to a block with id="back" if the page on which this block is opened in a new tab?
Answer the question
In order to leave comments, you need to log in
document.getElementById('back').style.display = (window.history.length == 1) ? "none" : "";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question