How to disable CSS in Browser for testing purposes

后端 未结 16 1574
自闭症患者
自闭症患者 2020-11-28 23:05

Is there any way I can disable all external CSS in a browser (Firefox, Chrome...)?

When using slower internet connection, sometimes only the bare HTML is loaded by t

16条回答
  •  鱼传尺愫
    2020-11-28 23:29

    Expanding on scrappedocola/renergy's idea, you can turn the JavaScript into a bookmarklet that executes against the javascript: uri so the code can be re-used easily across multiple pages without having to open up the dev tools or keep anything on your clipboard.

    Just run the following snippet and drag the link to your bookmarks/favorites bar:

    • I would avoid looping through the thousands of elements on a page with getElementsByTagName('*') and have to check and act on each individually.
    • I would avoid relying on jQuery existing on the page with $('style,link[rel="stylesheet"]').remove() when the extra javascript is not overwhelmingly cumbersome.

提交回复
热议问题