简体   繁体   English

Chrome-阻止脚本在页面中运行

[英]Chrome - Prevent scripts from running in a page

Is there anyway to prevent changes to web pages such as a live chat or a video feed? 无论如何,有没有阻止诸如实时聊天或视频供稿之类的网页更改? Im guessing its a javascript that times out the webpage and then exits it or prevents further entry. 我猜想它是一个JavaScript,它会使网页超时,然后退出它或阻止其进一步进入。

I saw this question: Freeze screen in chrome debugger / DevTools panel for popover inspection? 我看到了这个问题: 在chrome调试器/ DevTools面板中冻结屏幕以进行弹出检查?

What I did was I inspected the element, then went to the line of code and then clicked on :hover but the script still executed and locked me out. 我所做的是检查了元素,然后转到代码行,然后单击:hover,但脚本仍然执行并将我锁定。 Any other ways you can think of to prevent changes being made to a page? 您还有其他方法可以防止对页面进行更改吗?

Chrome allows you to disable JavaScript on certain pages, to do so click on the globe of the URL bar and it will show some permission options for the site you are. Chrome浏览器允许您在某些页面上禁用JavaScript,方法是单击URL栏上的地球,它将显示您所在站点的一些权限选项。 There disable JavaScript. 有禁用JavaScript。

How to deliberately freeze javascript in chrome (plugin/console) 如何在Chrome中故意冻结javascript(插件/控制台)

Found another solution in the link above: 在上面的链接中找到了另一个解决方案:

  1. Open Chrome javascript console 打开Chrome JavaScript控制台
  2. Go to "sources" 转到“来源”
  3. On the right side, click the little "pause" icon, or press F8 to pause script execution. 在右侧,单击小的“暂停”图标,或按F8键暂停脚本执行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM