私が必要なもの
ビューソースjsコードでjsコードを非表示にする必要があります
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>
問題
- ビュー ソースで js コードを非表示にする必要があります。
デバッグ
http://www.sitepoint.com/hide-jquery-source-code/でリンク検索ソリューションを参照しました。
ただし、コードは引き続き表示されます。
どんな提案でも大歓迎です。
ビュー ソースで js の表示を停止できないことはわかっていますが、それでも何らかのトリックが必要です。