• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 403 Error When adding Javascript

#1
I am trying to ad this adblock detect code to my site:

<style>
#veEJgfawLXQc {
display: none;
margin-bottom: 30px;
padding: 20px 10px;
background: #D30000;
text-align: center;
font-weight: bold;
color: #fff;
border-radius: 5px;
}
</style>

<div id="veEJgfawLXQc">
Our website is made possible by displaying online advertisements to our visitors.<br>
Please consider supporting us by disabling your ad blocker.
</div>

<script src="/ads.js" type="text/javascript"></script>
<script type="text/javascript">

if(!document.getElementById('gJuzclCLspFo')){
document.getElementById('veEJgfawLXQc').style.display='block';
}

</script>

But I get this:

Screen Shot 2017-03-08 at 7.19.32 PM.png

Could it be something with my .htaccess file?
 

Mike

XenForo developer
Staff member
#3
If you're getting that while trying to save the template, you should contact your host. Something like mod_security is blocking the request.