Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

291
Views
Trying to use script tag for video player, page source isn't showing the code loaded

This is really strange and I've never encountered it before. I have a javascript script tag that I'm using on one of my xenforo pages, but it's not showing up so I commented it out for testing. Here's what's weird:

When I comment the code, view page source shows the code as commented, but when I go to uncomment it again then page source shows no trace of it and it's just removed.

Has anyone ever experienced this? This is the only javascript tag I can see that's doing this, but I can add anything else in its place and it shows properly, but given the fact that it shows when commented I just can't seem to figure out what's going on.

Does this sound familiar to anyone?

UPDATE: adding code

<head>
<script type="text/javascript">
    console.log('test function')
    </script>
  
    <script type="text/javascript">
    (function(){
console.log('in function now');
        var site_id = 0000;
        var data_site_id = 0;

        var sn_cb = new Date().getMonth();
        var snack_hb = document.createElement('script');
        snack_hb.src = 'https://cdn-header-bidding.snack-media.com/assets/js/snack-loader/'+site_id+'?cb='+sn_cb;
        snack_hb.id = 'snack_ads';
        if(data_site_id){
            snack_hb.setAttribute('data-site-id',data_site_id);
        }
        console.log(snack_hb);
        document.body.appendChild(snack_hb);
        snack_hb.onerror = function(){
            document.body.removeChild(snack_hb);
            var snack_hb2 = document.createElement('script');
            snack_hb2.src = 'https://cdn2-header-bidding.snack-media.com/assets/js/snack-loader/'+site_id+'?cb='+sn_cb;
            snack_hb2.id = 'snack_ads';
            if(data_site_id){
                snack_hb2.setAttribute('data-site-id',data_site_id);
            }
            document.body.appendChild(snack_hb2);
        };
    })();
</script>
</head>

If I run this, then I see the 'test function' print in console, but the script below it literally doesn't exist on the page

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!