简体   繁体   English

我怎么知道用户是否篡改了CSS或JavaScript来改变我网站的外观?

[英]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.

相关问题 如何使用JavaScript永久更改网站中的CSS文件? - How can I permanently change css file in my website using javascript? 如何更改此 javascript 动画在我网站上的位置? - How can i change the placement of this javascript animation on my website? 如何知道用户何时离开我的网站 - How to know when a user leave my website 如何根据URL的结果在我的angular 7网站上更改css元素? - How can I change a css element on my angular 7 website based on result for a url? 我怎么知道json网络令牌是否被篡改 - how do i know if a json web token is tampered with or not 我如何在我的网站上有多个手风琴下拉菜单。 HTML,CSS JavaScript - How can I have multiple accordion drop down menus in my website. HTML, CSS JavaScript 我在网站上添加了在线JavaScript。 如何更改该JavaScript添加的网页中的HTML? - I added online JavaScript in my website. How can I change HTML in my webpage which is added by that JavaScript? 如何更改Node.js计算器的颜色和外观? - How can i change the colors and appearance of my node.js calculator? 如果用户使用javascript从其他选项卡中的Facebook注销,如何在我的网站中收到通知? - How can I get notified in my website if user log out from facebook in other tab using javascript? 如何使用 PHP 和/或 JavaScript 将用户的分数存储在我网站上的变量中? - How can I store a user's score in a variable on my website using PHP and/or JavaScript?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM