我發現在此頁面
uj5u.com熱心網友回復:
他們正在使用這個 DevTools 檢測器。如果檢測到 DevTools,它們會將播放器框架重定向到../player/includes/template/no_video.html:
<script type="text/javascript">
!function() {
navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/Windows Phone/i) || (devtoolsDetector.addListener(function(t, e) {
t && (document.location.href = "../player/includes/template/no_video.html")
}),
devtoolsDetector.launch())
}();
</script>
您可以使用一些能夠阻止請求并阻止https://loading.su/player/assets/devtools-detector/devtools-detector.min.js它們從中加載腳本的瀏覽器擴展程式。例如,配置了“Fanboy's Annoyance List”的AdBlock Plus確實為我成功阻止了它。
查看他們的代碼,如果檢測到移動用戶代理,則不會發生這種情況,因此在 DevTools 中啟用移動視圖,重新加載頁面,然后在頁面已經打開時再次禁用移動視圖(因為此檢查僅加載視頻時完成一次)。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/472195.html
標籤:javascript html dom 刮擦
