I have a javascript that I want to link to elsewhere in the site. But I am thinking about the top line. Would that line need to be on every page along with the reference link? Or can I just add it to the JS file? Any help appreciated.

Code:
<style type="js" id="antiClickjack">body{display:none !important;}</style>
<script type="text/javascript">
    if (self === top) {
        var antiClickjack = document.getElementById("antiClickjack");
        antiClickjack.parentNode.removeChild(antiClickjack);
    } else {
        top.location = self.location;
    }
</script>