[英]How can I know if the user tampered with the CSS or JavaScript to change the appearance of my website?
In other words, can I know if somebody uses script or CSS extension tools? 换句话说,我可以知道是否有人使用脚本或CSS扩展工具?
For example, he aligned things differently, placed display: none;
例如,他以不同的方式对齐事物,放置display: none;
on several elements, used jQuery's .hasClass
to add or remove divs? 在几个元素上,使用jQuery的.hasClass
来添加或删除div?
I don't think there's any one-shot, easy, "Hey, they modified the page" way. 我不认为有任何一次性,轻松,“嘿,他们修改了页面”的方式。 You'd have to have a record of exactly what elements you were expecting to be on the page, and their effective CSS properties, and then check all of those at runtime against the actual DOM and the effective CSS properties of the elements in the DOM. 您必须准确记录您期望在页面上显示哪些元素及其有效的CSS属性,然后在运行时检查所有这些元素与实际DOM以及DOM中元素的有效CSS属性。
It's going to be prohibitively complicated and hard to maintain. 这将是非常复杂和难以维护的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.