How to detect and/or block browser extensions that mess up my website?

浪尽此生 提交于 2019-12-05 15:22:48

If you think it is worth the trouble, you could implement your own extension (and offer the user to install it to get rid of UI-breaking).

In this extension you should use the chrome.management API to:

  1. Get all installed and enabled extensions (using method getAll()).
  2. Detect the ones you know are "harmful" to your UI (e.g. filter the installed and enabled extentions against a list of known-to-cause-trouble extension IDs or names).
  3. Inform the user about the situation.
  4. Offer to disable or even uninstall the problematic extensions.

(I haven't tested it but supposedly you could disable or uninstall an extension even without the user's intervention, but -even if doable- it is hardly a good practise.)

I dont think you can block the extensions, however you could detect that your buttons are getting hidden and if so show a message explaining the user that they probably have such and such extension installed, with instructions on how to remove them. Will cover most cases.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!