what I need
I need to hide js code in view source js code
function unloadJS(scriptName) { var head = document.getElementsByTagName('head').item(0); var js = document.getElementById(scriptName); js.parentNode.removeChild(js); } function unloadAllJS() { var jsArray = new Array(); jsArray = document.getElementsByTagName('script'); for (i = 0; i < jsArray.length; i++){ if (jsArray[i].id){ unloadJS(jsArray[i].id) }else{ jsArray[i].parentNode.removeChild(jsArray[i]); } } } var page_count = {{count()}}; if (page_count == 4) { dataLayer.push({'event':'mobilePromo-android'}); } $(document).ready(function() { var page_count = {{count()}}; var height= $(window).height(); if (page_count == 4 ) { $.ajax({ type: "GET", url: "http://times.com/mobilepopuptracker?from=android", }); $('body').html('<div class="row flush aligncenter popbx" style="height:'+height+'px"><div class="12u">'); } else { } }); function redirect() { var a=$(location).attr('href'); window.location.href=a; } </script>
Problem
- I Need to hide js code in view source.
Debug
i have reffred the link find solution on http://www.sitepoint.com/hide-jquery-source-code/.
though code is still viewed.
any suggestion are most welcome.
though we know we cannot stop viewing of js in view source but still there must be some trick.