Skip to content

Instantly share code, notes, and snippets.

@simonlindholm
Created March 23, 2019 18:46
Show Gist options
  • Save simonlindholm/4cbc3a9618623c6f3cd1576127710dac to your computer and use it in GitHub Desktop.
Save simonlindholm/4cbc3a9618623c6f3cd1576127710dac to your computer and use it in GitHub Desktop.
What would break if CSS introduced single-line comments?

Breakage from CSS single-line comments

//-style comments

Based on the hypothetical parsing rule: // is a single-line comment, unless that would cause it to contain { or }.

https://console.cloud.google.com/bigquery?sq=36769687750:c41ab4e44c0d42b0be84ff4466e22682

SELECT
  page,
  url
FROM
  `httparchive.response_bodies.2019_02_01_desktop`
WHERE
  url LIKE '%.css%' and
  REGEXP_CONTAINS(body, r"(^|[^/]\*/)[^/]*(/[^*][^/]*)*([^:\"'\(*]|^)//([^;\"'\)\{\}\n]*\n[ \t]*[^ \t\}]|[^;\"'\)\n]*;[^;\n)]*;[^\{\}]*(\n|$))");

41624 hits, on 36552 unique pages, out of a total of 3447000 pages.

https://docs.google.com/spreadsheets/d/1lXmEFbsC9vSnSya9_PgTJAD9AQ-JYg663SzpWj7l5zs/edit?usp=sharing

Breakage from the first 20 hits

https://webdosyasp.diyanet.gov.tr/muftuluk/Diyanet2016/Assets/Styles/dibStyle.css

(minimal difference, slight improvement from including the rule)

//sosyal medya icon css 

.jssocials-shares {
   margin: 0.2em 0; }

http://dspace.uniten.edu.my/css/jdyna.css

(couldn't find any element matching #tab)

#tab a {
	float: left; //
	display: block;
	width: .1em;
	background: url(../image/jdyna/right_both.gif) no-repeat right top;
	padding: 5px 15px 5px 6px;
	text-decoration: none;
	font-weight: bold;
	color: #765;
}

http://community.lightspeedsystems.com/wp-content/plugins/videojs-html5-video-player-for-wordpress/plugin-styles.css?ver=4.7.12

(equivalent, I believe)

.video-wrapper .video-js, .video-wrapper img.vjs-poster {
    width: 100% !important;
    height: 100% !important; //these need !important because IE wants to set height/width to 100px
    max-width: 100%;
}

http://www.snsi.jp/css/layout.css

(no visual difference)

input[type=submit] {
	text-align:center;
	display: inline;
	padding: 2px 5px;
	width: auto; // 縺薙%
	vertical-align: bottom;
}

http://www.natfak2.uni-halle.de/im/sod/common/css/screen/content.css

(no visual difference)

img#audit {
	clear: both; //nur zur sicherheit, falls darüas gefloatet ist
	float: right;
	margin-top: 2em; //der abstand zwischen haupt- und zielgruppennav
}

https://d2dhoetkfll74o.cloudfront.net/p/36791/Grq0ojAxkemHff5o2FH0kt2hBjHqcdds.css

(invalid css file)

https://www.tuttointermediari.it/wp-content/plugins/page-loader/style.css?ver=5.0.3

(equivalent given a later @keyframes)

// Animation Keyframes
@-webkit-keyframes plsqaurerotate { ... }

http://www.secar.com.tw/style/css/liMarquee.css

(equivalent, zoom doesn't do anything)

  //
  zoom:1;

https://ssprohk.com/wp-content/themes/wpresidence/style.css?ver=5.0.3

(can't find element matching .featured_agent_listings.wpresidence_button; on another site with that element including the rule is an improvement)

//wpb_button

.featured_agent_listings.wpresidence_button{
    padding: 4px 10px 4px;
    background-color: #7F8C8D;
    border-bottom: 3px solid #687373;
    color: #ffffff;
}

https://employee.newellbrands.com/wcsstore/EmployeeStorefrontAssetStore/css/base.css

(old-IE, doesn't matter)

	@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
	/* IE10+ CSS styles go here */
		// Fix for Fullscreen Image in IE
		overflow: auto !important;

http://hsj.goodword.jp/style.css

(combined with another syntax error)

https://namaniku.net/wp-content/themes/twentyseventeen_child/style.css?ver=5.0.3

(combined with another syntax error)

https://uncoveredhistory.com/wp-content/themes/twentyfouteen-child/style.css?ver=5.0.3

(can't find .slider element)

.slider .featured-content {
     max-width: 1124px; // Adjust to suite your needs
     margin: 0 auto; // Adjust to suite your needs
}
.slider .featured-content .post-thumbnail img {
     max-width: 1124px; // Adjust to suite your needs
     width: 100%;
}

https://ects.icave.com.mx/skins/base_skin/css/styles.css

(can't find .head element)

// Formas y estilos del calendario
.head {
	font-family: arial;
	font-size: 12px;
	font-weight: normal;
}

https://www.pacific-university.ac.in/css/bootstrap.css

(small difference, layout looks a tiny bit worse)

//h1,
.h1,
h2,
.h2,
h3,
.h3 {
  margin-top: 20px;
  margin-bottom: 10px;
}

http://northcarolina.universitypressscholarship.com/skin/0d92b10310bfbdcbe7d82e217498659e3e3ee53a/css/override.css

(can't find .dialog element)

// Trac #1299
.dialog table.table_window {  
    background-color: #FAF9F2;
}

https://jasminetx.com/wp-content/plugins/woo-products-list/assets/css/wcplpro.css?ver=5.0.3

(can't find .wcplpro_pagination_wrap element)

// CSS Code - add this to the style.css file
.wcplpro_pagination_wrap { list-style:none; font-size:12px; }

http://vip.karelia.pro/wbb/default//wbbtheme.css

(false positive)

https://unfpaanalytics.bi.ibmcloud.com/bi/css/admin/fonticons.css

(site requires login, but unbreaking an icon should be fine)

// Icons
.wfg_accept:before {
	content:"\f101";
}

https://institutodoanimal.pt/wp-content/plugins/beauty-contact-popup-form/inc/beauty-contact-popup-form.css?ver=4.3.18

(can't find .color-option-one or .color-option-two elements)

// set all links to red
.color-option-one a {
	color: #ff0000;
}

// set all links to blue
.color-option-two a {
	color: #0000ff;
}

Examples where the {} rule is needed

https://l-stat.livejournal.net/??schemius_v4/header_v5.css,schemius_v4/header-journal.css,medius/scheme/components.css?v=1548937061

.subscription__title:first-child{//margin:0}

https://dyjgaef5vuq51.cloudfront.net/Feb_14_2019_2_https/styles/floatbutton.css

//.zsiq_float *, .zsiq_float{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;font-family:'Roboto', sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}.zsiq_theme5 .zsiq_flt_rel em{font-style:normal;}//        .zsiq_float{display:inline-block;// position:fixed;bottom:10px;right:10px;}

#-style comments

# surrounded by whitespace denotes a comment.

https://console.cloud.google.com/bigquery?sq=36769687750:3e816f0e34fb481797f47574435f005a

SELECT
  page,
  url
FROM
  `httparchive.response_bodies.2019_02_01_desktop`
WHERE
  url LIKE '%.css%' and
  REGEXP_CONTAINS(body, r"(^|[^/]\*/)[^/]*(/[^*][^/]*)*# [^\"'\)]*[;:\(\n]");

14622 hits, on 12967 unique pages, out of a total of 3447000 pages.

https://docs.google.com/spreadsheets/d/1I1LfuMChCXjgOs_5YWtDMWVAHCIFWuj4NnWK9nXAmdQ/edit?usp=sharing

Breakage from first 10 hits

https://selfservice.baycounty-mi.gov/mss/custom/StyleSheet.css

(page doesn't load)

https://gravity-software.com/js/shopify/rondell/jquery.rondell1703.css?v=124b77225ef1bcbaf9ba9bef48e0dd08

(doesn't break anything)

#  left: 50%;

https://www.jobowork.ru/style.css

(minified code; page completely breaks if space before # is not required)

blah blah# .datagrid table{ ... rest of CSS

https://www.allglobalcircle.com/view/css/1006200/common-stylesheet2.css

(harmless since there's no surrounding grouping rule; auto-generated ID selector for an empty ID?)

.ms # ul.r_nav li.r_nav {
	float:left;
	list-style:none;
	padding:5px 0px 0 10px;
	margin: 0;
}

https://digitalcommons.georgefox.edu/dc-mobile-nav.css

(some style changes)

.nav-collapse a {
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  border-top: 1px solid white;
  text-decoration: none;
  background: #333 !important;
  background: # !important;
  padding: 0.7em 1em;

http://www.yfms.tyc.edu.tw/ezfiles/0/1000/static/combine-zh-tw.css

(mostly harmless)

.thread-bits ul {
border-top: 1px # solid;
}

http://charbardc.com/wp-content/themes/charbardc/css/style.css?ver=5.0.3

(harmless if space is required before #)

#portfolio ul# {
margin: 0 0 30px 0;
padding: 0;
position: relative;
}

https://academic.ntsu.edu.tw/ezfiles/4/1004/static/combine-zh-tw.css

(same CSS as above)

https://guriya-vostoka.ru/catalog/view/theme/moneymaker/stylesheet/moneymaker.css?v1.00004

(harmless)

	  # padding: 1px 12px !important;
	  # margin: 0 1px !important;

http://blog-imgs-57.fc2.com/m/a/k/makistudio/css/fbeae.css

(some breakage)

.various_outline { 
border:# 0px solid;      /* 外枠の色/太さ/実線  */
margin-bottom:10px; 
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
}

///-style comments

Same regex as for //, but with /// instead.

1964 hits, on 1754 unique pages, out of a total of 3447000 pages.

About half seem to be false positives.

https://docs.google.com/spreadsheets/d/1mIiV7XiqPMJyV_UMpn3tiQhkaLzSWZq-36xsDhaliOk/edit?usp=sharing

!!! denotes a difference
=== describes the practical effect of the difference
??? denotes failed runs
https://bayburt.diyanet.gov.tr/... removed 2 //-style comments
!!! perf: 1508 ms, diff: <html><body class= ms-backgroundImage><form id=aspnetForm><div id=s4-workspace><div id=s4-bodyContainer><div class=body-content><div class=main-container container><div><span id=DeltaPlaceHolderMain><div><div><div class=ms-webpart-zone ms-fullWidth><div id=MSOZoneCell_WebPartctl00_ctl35_g_c24810b7_84b5_4644_8c78_29db5edb15c4 class=s4-wpcell-plain ms-webpartzone-cell ms-webpart-cell-vertical ms-fullWidth ><div class=ms-webpart-chrome ms-webpart-chrome-vertical ms-webpart-chrome-fullWidth ><div id=WebPartctl00_ctl35_g_c24810b7_84b5_4644_8c78_29db5edb15c4 class=ms-WPBody noindex ><div id=ctl00_ctl35_g_c24810b7_84b5_4644_8c78_29db5edb15c4><div class=ayet-hadis-dua><div class=ahd-boxes><div class=ayet><div class=aht-bottom><div class=social-btns-holder><div class=social-btns><div class=jssocials-shares>; margin-block-end 0px 2.8px, found: True
=== very small difference
http://dspace.uniten.edu.my/... removed 5 //-style comments
perf: 573 ms, diff: None, found: True
http://community.lightspeedsystems.com/... removed 1 //-style comments
perf: 781 ms, diff: None, found: False
http://www.snsi.jp/... removed 1 //-style comments
perf: 378 ms, diff: None, found: True
http://www.natfak2.uni-halle.de/... removed 1 //-style comments
perf: 397 ms, diff: None, found: True
https://www.volvocarsofmarietta.com/... removed 8 //-style comments
perf: 1495 ms, diff: None, found: False
https://www.tuttointermediari.it/... removed 1 //-style comments
perf: 1611 ms, diff: None, found: False
http://www.secar.com.tw/... removed 1 //-style comments
perf: 853 ms, diff: None, found: True
https://ssprohk.com/... no regex match
https://employee.newellbrands.com/... removed 1 //-style comments
perf: 444 ms, diff: None, found: True
http://hsj.goodword.jp/... removed 1 //-style comments
perf: 277 ms, diff: None, found: True
https://namaniku.net/... removed 1 //-style comments
perf: 2350 ms, diff: None, found: False
https://uncoveredhistory.com/... removed 2 //-style comments
perf: 3547 ms, diff: None, found: False
https://ects.icave.com.mx/... removed 1 //-style comments
perf: 336 ms, diff: None, found: True
https://www.pacific-university.ac.in/... removed 1 //-style comments
!!! perf: 1049 ms, diff: <html>; block-size 2515.83px 2535.83px, found: True
=== spacing changes, looks slightly worse
http://northcarolina.universitypressscholarship.com/... error: HTTP Error 404: Not Found
https://jasminetx.com/... no regex match
http://vip.karelia.pro/... removed 1 //-style comments
perf: 1436 ms, diff: None, found: True
https://unfpaanalytics.bi.ibmcloud.com/... removed 1 //-style comments
perf: 81 ms, diff: None, found: False
https://institutodoanimal.pt/... removed 2 //-style comments
perf: 846 ms, diff: None, found: False
http://johnsonandbell.com/... removed 4 //-style comments
perf: 434 ms, diff: None, found: False
https://www.amarilojewelry.com/... removed 1 //-style comments
perf: 775 ms, diff: None, found: False
https://www.bankanotu.com/... removed 1 //-style comments
perf: 828 ms, diff: None, found: True
https://www.xml-solar.com/... removed 3 //-style comments
perf: 3518 ms, diff: None, found: False
https://www.vivamexicankitchen.com/... removed 2 //-style comments
perf: 371 ms, diff: None, found: False
http://www.semovi.oaxaca.gob.mx/... error: Message: Timeout loading page after 300000ms
http://www.semovi.oaxaca.gob.mx/... error: Message: Timeout loading page after 300000ms
http://www.dsource.in/... removed 1 //-style comments
!!! perf: 3863 ms, diff: <html class=js><body class=html front not-logged-in no-sidebars page-node><div class=goog-te-spinner-pos><div class=goog-te-spinner-animation><svg class=goog-te-spinner>; transform matrix(-0.655191, -0.755464, 0.755464, -0.655191, 0, 0) matrix(-0.908121, 0.418707, -0.418707, -0.908121, 0, 0), found: True
=== false positive from JS
http://www.dsource.in/... removed 1 //-style comments
perf: 1420 ms, diff: None, found: True
http://www.dsource.in/... removed 1 //-style comments
perf: 1473 ms, diff: None, found: True
https://arpa-e.energy.gov/... removed 1 //-style comments
perf: 536 ms, diff: None, found: False
https://lastwordonsports.com/... removed 5 //-style comments
perf: 729 ms, diff: None, found: True
https://growingorganic.com/... removed 3 //-style comments
perf: 1515 ms, diff: None, found: False
http://www.raffles-university.edu.my/... removed 1 //-style comments
perf: 1478 ms, diff: None, found: True
http://d.costanorte.com.br/... no regex match
https://www.investtab.com/... removed 4 //-style comments
perf: 447 ms, diff: None, found: True
https://www.pak-rite.com.au/... removed 2 //-style comments
perf: 2271 ms, diff: None, found: True
https://www.oieau.fr/... removed 1 //-style comments
perf: 2991 ms, diff: None, found: True
https://iris.unisalento.it/... removed 5 //-style comments
perf: 635 ms, diff: None, found: False
https://leclub-golf.com/... removed 3 //-style comments
perf: 1860 ms, diff: None, found: True
https://leclub-golf.com/... removed 3 //-style comments
perf: 1767 ms, diff: None, found: True
https://leclub-golf.com/... removed 3 //-style comments
perf: 1701 ms, diff: None, found: True
http://www.rubin-2000.ru/... removed 1 //-style comments
perf: 1032 ms, diff: None, found: True
https://papelariapratika.com.br/... no regex match
https://appsco.platzi.com/... removed 662 //-style comments
perf: 585 ms, diff: None, found: False
https://appsco.platzi.com/... removed 662 //-style comments
perf: 605 ms, diff: None, found: False
https://www.kreis-guetersloh.de/... removed 1 //-style comments
error: TypeError: document.body is null
step1@https://www.kreis-guetersloh.de/index.php:115:9
runChecked@https://www.kreis-guetersloh.de/index.php:57:13
go@https://www.kreis-guetersloh.de/index.php:161:5
@https://www.kreis-guetersloh.de/index.php:163:1
@https://www.kreis-guetersloh.de/index.php:1:2
https://ashleyandmartin.com.au/... removed 1 //-style comments
perf: 1598 ms, diff: None, found: True
http://www.dynocom.net/... removed 1 //-style comments
perf: 478 ms, diff: None, found: True
http://www.chronofhorse.com/... removed 18 //-style comments
perf: 2108 ms, diff: None, found: False
https://www.fsk.de/... removed 1 //-style comments
perf: 394 ms, diff: None, found: True
https://vicariauction.com/... removed 5 //-style comments
perf: 443 ms, diff: None, found: True
https://www.marshproperties.com/... removed 1 //-style comments
!!! perf: 741 ms, diff: <html class=js><body class=home page-template-default page page-id-7 color-custom style-simple layout-full-width mobile-tb-left no-content-padding hide-love header-classic header-fw minimalist-header sticky-header sticky-white ab-hide subheader-title-left menuo-right menuo-no-borders fts-powered-by-text-popup nice-scroll><div id=Wrapper><div id=Header_wrapper><header id=Header><div id=Top_bar class=><div class=container><div class=column one><div class=top_bar_left clearfix><div class=logo><a id=logo>; transition-duration 0s 0.3s, found: True
=== no visual difference. Broken by minifier, which arbitrarily put a newline in the middle of a selector
http://www.skb.com.vn/... removed 3 //-style comments
perf: 924 ms, diff: None, found: True
http://eaglesofdeathmetal.com/... removed 1 //-style comments
!!! perf: 2239 ms, diff: <html><body id=s101_page_home>; border-block-end-color rgb(0, 0, 0) rgb(204, 204, 204), found: True
=== no visual difference
http://www.donaldsontoolbox.com.au/... removed 6 //-style comments
perf: 546 ms, diff: None, found: True
https://www.nasck.org/... removed 4 //-style comments
perf: 1398 ms, diff: None, found: True
https://www.enoshop.co.il/... removed 3 //-style comments
perf: 4786 ms, diff: None, found: True
http://www.chingssecret.com/... removed 11 //-style comments
perf: 1541 ms, diff: None, found: True
https://magazine.foriowa.org/... removed 1 //-style comments
perf: 851 ms, diff: None, found: True
https://mundohonda.cr/... removed 1 //-style comments
perf: 867 ms, diff: None, found: True
https://dk.elitedaters.com/... removed 2 //-style comments
perf: 484 ms, diff: None, found: True
https://campofant.com/... error: HTTP Error 404: Not Found
https://www.budgetcampervans.com/... removed 4 //-style comments
perf: 2277 ms, diff: None, found: False
https://www.lib.cwu.edu/... removed 4 //-style comments
perf: 1101 ms, diff: None, found: False
http://watchwrestling.tw/... removed 1 //-style comments
!!! perf: 648 ms, diff: <html class= js flexbox flexboxlegacy canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers no-applicationcache svg inlinesvg smil svgclippaths><body class=home blog wp-custom-logo title-tagline-hidden><div id=openModal class=mb_elegantModal><div class=animated>; cursor auto default, found: False
=== spacing change, looks slightly better
https://maringa.colegiosmaristas.com.br/... removed 4 //-style comments
perf: 1184 ms, diff: None, found: True
https://maringa.colegiosmaristas.com.br/... removed 1 //-style comments
perf: 1253 ms, diff: None, found: True
https://www.jbox.co.kr/... removed 1 //-style comments
!!! perf: 5834 ms, diff: <html class=fontawesome-i2svg-active fontawesome-i2svg-complete><body class=modal-open pace-done><div class=pace pace-inactive>; pointer-events auto none, found: True
=== no visual difference
https://testbiene.com/... error: HTTP Error 404: Not Found
??? http://bsaa.edu.ru/... error: 'utf-8' codec can't decode byte 0xce in position 24228: invalid continuation byte
https://mirador.co.jp/... removed 1 //-style comments
perf: 875 ms, diff: None, found: True
https://www.boutblank.com/... removed 1 //-style comments
perf: 5657 ms, diff: None, found: True
https://www.goedkoopste-telefoonabonnement.nl/... removed 2 //-style comments
perf: 1518 ms, diff: None, found: True
https://portal.vccusa.com/... removed 1 //-style comments
perf: 184 ms, diff: None, found: True
https://portal.vccusa.com/... removed 1 //-style comments
perf: 182 ms, diff: None, found: True
https://puntorecarga.movilbox.net/... removed 2 //-style comments
perf: 151 ms, diff: None, found: True
https://conseilsveterinaire.com/... removed 1 //-style comments
perf: 1747 ms, diff: None, found: True
https://www.viktvaktarna.se/... removed 1 //-style comments
perf: 1981 ms, diff: None, found: False
http://psi-auktion.de/... removed 1 //-style comments
perf: 390 ms, diff: None, found: True
https://www.zeusnews.it/... removed 5 //-style comments
perf: 1171 ms, diff: None, found: True
https://itau.enlaceinmobiliario.cl/... removed 1 //-style comments
perf: 2509 ms, diff: None, found: False
https://www.downvideo.org/... removed 10 //-style comments
perf: 313 ms, diff: None, found: True
https://www.feijosul.pt/... removed 1 //-style comments
perf: 2573 ms, diff: None, found: True
https://www.feijosul.pt/... removed 1 //-style comments
perf: 2542 ms, diff: None, found: True
https://www.feijosul.pt/... removed 1 //-style comments
perf: 2604 ms, diff: None, found: True
??? https://www.feijosul.pt/... error: 'utf-8' codec can't decode byte 0xe7 in position 14721: invalid continuation byte
https://tutorials.cpnp.voxelbusters.com/... removed 1 //-style comments
perf: 541 ms, diff: None, found: True
http://www.pornofamille.com/... removed 1 //-style comments
perf: 380 ms, diff: None, found: True
https://www.racingsportswear.com/... removed 1 //-style comments
perf: 3301 ms, diff: None, found: True
https://ees.dxmb.vn/... removed 1 //-style comments
!!! perf: 326 ms, diff: <html>; block-size 18px 42px, found: True
http://www.allsetrestaurant.com/... removed 1 //-style comments
perf: 562 ms, diff: None, found: True
http://uxxisso.elpoli.edu.co/... removed 1 //-style comments
!!! perf: 322 ms, diff: <html><body><span><a>; font-family serif Arial, Helvetica, Geneva, sans-serif, found: True
http://ian.umces.edu/... removed 1 //-style comments
perf: 464 ms, diff: None, found: True
https://bv.gov.hu/... removed 13 //-style comments
perf: 1607 ms, diff: None, found: False
https://www.thehepburndc.com/... removed 1 //-style comments
perf: 483 ms, diff: None, found: True
http://starsandstripesdaily.org/... removed 5 //-style comments
!!! perf: 7728 ms, diff: <html class=wf-actadisplay-n7-active wf-actadisplay-i7-active wf-actadisplay-n4-active wf-actadisplay-i4-active wf-trajanpro3-n4-active wf-trajanpro3-n7-active wf-active>; block-size 4051.68px 5724.1px, found: True
http://saihousou.site/... removed 1 //-style comments
perf: 436 ms, diff: different imports, found: True
=== missing a font import when // are not parsed as comments
http://saihousou.site/... removed 1 //-style comments
perf: 403 ms, diff: None, found: True
http://dienbien.gov.vn/... removed 1 //-style comments
perf: 2528 ms, diff: None, found: True
http://dienbien.gov.vn/... removed 1 //-style comments
perf: 2549 ms, diff: None, found: False
https://www.heritancehotels.com/... removed 1 //-style comments
!!! perf: 2786 ms, diff: <html class=no-js><body class=destinations><div id=wrapper><section class=wide-area border-top><div class=column-5 overflow-hidden home-overflow-show home-page-slider><div class=flexslider id=promo-slider><ul class=slides><li><div class=negombo><div class=column-2 news-eliment dark><div class=radioDiv>; inline-size 120px 118px, found: True
https://haier-ac.pl/... removed 2 //-style comments
perf: 1965 ms, diff: None, found: True
http://diktis.kemenag.go.id/... removed 13 //-style comments
perf: 1153 ms, diff: None, found: True
https://webserver.afyon.bel.tr/... removed 5 //-style comments
error: TypeError: document.body is null
step1@https://webserver.afyon.bel.tr/web/guest/2:115:9
runChecked@https://webserver.afyon.bel.tr/web/guest/2:57:13
go@https://webserver.afyon.bel.tr/web/guest/2:161:5
@https://webserver.afyon.bel.tr/web/guest/2:163:1
@https://webserver.afyon.bel.tr/web/guest/2:1:2
https://webserver.afyon.bel.tr/... removed 5 //-style comments
perf: 549 ms, diff: None, found: True
https://affiliateadmin.ccbill.com/... removed 3 //-style comments
perf: 74 ms, diff: None, found: True
??? https://avtochast.ru/... error: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
https://valkompassen.svt.se/... removed 18 //-style comments
perf: 603 ms, diff: None, found: True
https://valkompassen.svt.se/... removed 7 //-style comments
perf: 583 ms, diff: None, found: True
https://www.8tyo-no-yu.co.jp/... removed 1 //-style comments
perf: 1178 ms, diff: None, found: True
https://www.stanion.com/... removed 1 //-style comments
perf: 9596 ms, diff: None, found: True
https://catalogue.swanngalleries.com/... error: Message: Reached error page
https://www.pristiq.com/... removed 1 //-style comments
perf: 696 ms, diff: None, found: True
??? http://www.studentland.ua/... error: 'utf-8' codec can't decode byte 0xd8 in position 1076: invalid continuation byte
http://www.marivanioscollege.com/... removed 1 //-style comments
perf: 487 ms, diff: None, found: True
http://www.marivanioscollege.com/... removed 1 //-style comments
perf: 488 ms, diff: None, found: True
http://www.uproducers.com/... removed 1 //-style comments
perf: 862 ms, diff: None, found: True
https://planetaguarani.com.br/... removed 1 //-style comments
perf: 1401 ms, diff: None, found: False
https://orette.jp/... removed 2 //-style comments
perf: 856 ms, diff: None, found: True
https://orette.jp/... removed 2 //-style comments
perf: 736 ms, diff: None, found: True
http://literatura.itematika.com/... removed 2 //-style comments
perf: 374 ms, diff: None, found: True
https://www.thefirstbank.com/... removed 2 //-style comments
!!! perf: 1361 ms, diff: <html class= js no-touch geolocation rgba backgroundsize borderimage borderradius boxshadow opacity cssgradients csstransforms csstransforms3d csstransitions fontface generatedcontent video svg><body class=home has-alert><div class=master-container><header class=header><div class=full-width><div class=alert__container><div class=alert hidden-alert id=alertBox><div class=inner><button class=close>; block-size 20.5px 21px, found: False
https://www.latin-america.adidas.com/... error: [Errno 104] Connection reset by peer
https://www.latin-america.adidas.com/... error: [Errno 104] Connection reset by peer
https://www.latin-america.adidas.com/... error: [Errno 104] Connection reset by peer
https://isaute.ca/... removed 2 //-style comments
perf: 457 ms, diff: None, found: True
https://www.izaara.in/... removed 3 //-style comments
perf: 3175 ms, diff: None, found: False
http://www.sebraemercados.com.br/... removed 1 //-style comments
perf: 1628 ms, diff: None, found: True
http://www.sebraemercados.com.br/... removed 1 //-style comments
perf: 1774 ms, diff: None, found: True
https://darkpoutine.com/... removed 3 //-style comments
perf: 1679 ms, diff: None, found: True
https://www.camping-parcsaintjames.com/... removed 1 //-style comments
perf: 2024 ms, diff: None, found: True
https://buspro24.com/... removed 81 //-style comments
perf: 3632 ms, diff: None, found: True
http://club.montbell.jp/... removed 3 //-style comments
perf: 449 ms, diff: None, found: True
https://www.dreamproducts.com/... removed 1 //-style comments
perf: 2516 ms, diff: None, found: True
https://www.dreamproducts.com/... removed 4 //-style comments
perf: 2625 ms, diff: None, found: True
http://www.audioffers.com/... removed 1 //-style comments
perf: 628 ms, diff: None, found: True
http://www.viva-interactif.com/... no regex match
https://www.geoprint.jp/... no regex match
https://www.geoprint.jp/... no regex match
https://www.geoprint.jp/... no regex match
https://www.geoprint.jp/... no regex match
https://englewoodwater.com/... no regex match
http://www.eclathotels.com/... removed 1 //-style comments
perf: 91 ms, diff: None, found: True
http://www.automanga.com/... removed 1 //-style comments
perf: 502 ms, diff: None, found: True
https://www.roughbros.com/... removed 3 //-style comments
!!! perf: 478 ms, diff: <html><body><div class=container outer><div class=row header><div class=col-lg-10 col-md-10 col-sm-10><div class=row><div class=col-lg-12 col-md-12 col-sm-12><div class=visible-xs text-center ><p class=mobile-info>; margin-block-start 0px 5px, found: True
https://sii.ittapachula.edu.mx/... removed 1 //-style comments
perf: 32 ms, diff: None, found: False
https://libguides.stthomas.edu/... removed 1 //-style comments
perf: 8795 ms, diff: None, found: True
https://www.lessines.be/... error: HTTP Error 404: Not Found
https://www.zeusbeard.com/... removed 1 //-style comments
!!! perf: 2780 ms, diff: <html class=csstransforms csstransforms3d csstransitions><body class= cms-index-index floating-header hover-effect hover-scale none sidebar-left cms-home5 ><div class=aff-popup id=aff-popup>; max-inline-size 40% none, found: True
https://tinktura.com/... removed 1 //-style comments
perf: 1568 ms, diff: None, found: True
http://e-sklep.netia.pl/... removed 2 //-style comments
perf: 2460 ms, diff: None, found: True
https://portal.autoalert.com/... error: HTTP Error 404: Not Found
http://dadesobertes.seu-e.cat/... error: HTTP Error 500: Internal Server Error
http://www.sharestradingschool.com/... removed 1 //-style comments
perf: 1487 ms, diff: None, found: False
https://au.kobobooks.com/... removed 3 //-style comments
!!! perf: 485 ms, diff: <html class=>; block-size 4286.95px 4353.55px, found: False
https://gcoea.ac.in/... removed 1 //-style comments
perf: 2530 ms, diff: None, found: True
http://www.investinspain.org/... removed 1 //-style comments
perf: 551 ms, diff: None, found: True
https://www.vypinac-zasuvka.cz/... removed 1 //-style comments
perf: 4313 ms, diff: None, found: True
http://www.hallandhunter.com/... removed 11 //-style comments
perf: 2997 ms, diff: None, found: True
https://apex.ugi.com/... error: Message: Reached error page
https://aksaray.diyanet.gov.tr/... removed 2 //-style comments
!!! perf: 1709 ms, diff: <html><body class= ms-backgroundImage><form id=aspnetForm><div id=s4-workspace><div id=s4-bodyContainer><div class=body-content><div class=main-container container><div><span id=DeltaPlaceHolderMain><div><div><div class=ms-webpart-zone ms-fullWidth><div id=MSOZoneCell_WebPartctl00_ctl35_g_a311b329_0d8c_487c_bca0_4890daf26263 class=s4-wpcell-plain ms-webpartzone-cell ms-webpart-cell-vertical ms-fullWidth ><div class=ms-webpart-chrome ms-webpart-chrome-vertical ms-webpart-chrome-fullWidth ><div id=WebPartctl00_ctl35_g_a311b329_0d8c_487c_bca0_4890daf26263 class=ms-WPBody noindex ><div id=ctl00_ctl35_g_a311b329_0d8c_487c_bca0_4890daf26263><div class=ayet-hadis-dua><div class=ahd-boxes><div class=ayet><div class=aht-bottom><div class=social-btns-holder><div class=social-btns><div class=jssocials-shares>; margin-block-end 0px 2.8px, found: True
http://frederic-wou.net/... removed 1 //-style comments
perf: 887 ms, diff: None, found: True
https://freightbro.com/... removed 11 //-style comments
perf: 2934 ms, diff: None, found: True
https://app.reciboselectronicos.com/... removed 1 //-style comments
perf: 188 ms, diff: None, found: False
https://funtenna.funshop.co.kr/... removed 2 //-style comments
perf: 1214 ms, diff: None, found: True
https://www.darlington.k12.wi.us/... removed 1 //-style comments
perf: 745 ms, diff: None, found: True
https://www.barthelme.de/... removed 4 //-style comments
perf: 808 ms, diff: None, found: True
https://www.kinsalehotelandspa.ie/... removed 1 //-style comments
perf: 1444 ms, diff: None, found: True
http://ezoterra.com.ua/... removed 1 //-style comments
perf: 783 ms, diff: None, found: True
http://anbac.com.vn/... removed 1 //-style comments
perf: 1758 ms, diff: None, found: True
https://admission.lmu.edu.ng/... removed 1 //-style comments
perf: 788 ms, diff: None, found: True
https://kayseri.diyanet.gov.tr/... removed 2 //-style comments
!!! perf: 1756 ms, diff: <html><body class=modal-open ms-backgroundImage><form id=aspnetForm><div id=s4-workspace><div id=s4-bodyContainer><div class=body-content><div class=main-container container><div><span id=DeltaPlaceHolderMain><div><div><div class=ms-webpart-zone ms-fullWidth><div id=MSOZoneCell_WebPartctl00_ctl35_g_5bb849bd_249d_4bc2_baa2_faa6629cacd5 class=s4-wpcell-plain ms-webpartzone-cell ms-webpart-cell-vertical ms-fullWidth ><div class=ms-webpart-chrome ms-webpart-chrome-vertical ms-webpart-chrome-fullWidth ><div id=WebPartctl00_ctl35_g_5bb849bd_249d_4bc2_baa2_faa6629cacd5 class=ms-WPBody noindex ><div id=ctl00_ctl35_g_5bb849bd_249d_4bc2_baa2_faa6629cacd5><div class=ayet-hadis-dua><div class=ahd-boxes><div class=ayet><div class=aht-bottom><div class=social-btns-holder><div class=social-btns><div class=jssocials-shares>; margin-block-end 0px 2.8px, found: True
https://www.mototeks.com.tr/... removed 2 //-style comments
perf: 3128 ms, diff: None, found: True
http://artofzoo.uk/... removed 1 //-style comments
!!! perf: 3487 ms, diff: <html><body class=home blog><div id=openModal class=mb_elegantModal><div class=animated>; cursor auto default, found: False
https://www.jma2-jp.org/... error: HTTP Error 404: Not Found
https://forum.instinct-photo.fr/... removed 1 //-style comments
perf: 967 ms, diff: None, found: False
https://minzdrav.sakha.gov.ru/... removed 1 //-style comments
perf: 2828 ms, diff: None, found: True
http://www.vitrocolorcr.com/... removed 4 //-style comments
!!! perf: 436 ms, diff: <html>; block-size 1644.53px 1711.53px, found: True
https://www.myrehabexpert.com/... removed 1 //-style comments
perf: 2019 ms, diff: None, found: True
http://elcigs.ru/... removed 3 //-style comments
!!! perf: 1102 ms, diff: <html><body><div id=wrap1><div id=wrap2><div id=content><div id=main><div id=left-col><div id=catalog><div class=cpt_category_tree><div><div class=product tech-product><ul class=wrap-item><li class=item><div class=title>; border-block-end-color rgb(72, 72, 72) rgb(85, 89, 94), found: True
http://dwyanewade.com/... removed 1 //-style comments
perf: 335 ms, diff: None, found: False
https://xn---35-6cdk1dnenygj.xn--p1ai/... removed 1 //-style comments
perf: 3275 ms, diff: None, found: True
http://www.altyazilifilmhd.com/... no regex match
http://www.helderester.nl/... removed 1 //-style comments
perf: 339 ms, diff: None, found: True
https://www.pok.polimi.it/... removed 1 //-style comments
perf: 2439 ms, diff: None, found: True
https://gastore.ru/... removed 1 //-style comments
!!! perf: 7155 ms, diff: <html class=no-js bx-core bx-no-touch bx-no-retina bx-firefox><body><nav class=main_menu><ul class=top><li><ul class=sub catalog id=discounts><nav class=main_menu left><ul class=top><li><ul class=sub>; position absolute static, found: True
http://www.libqa.com/... removed 1 //-style comments
perf: 284 ms, diff: None, found: True
https://edison-opto.com.vn/... removed 1 //-style comments
perf: 7129 ms, diff: None, found: True
http://www.abcbyspu.com/... removed 1 //-style comments
!!! perf: 267 ms, diff: <html><body><div class=row border_pink nopad><div class=col-md-4><div class=google-maps>; block-size 163.2px 100.333px, found: True
http://xn--edk8azcf5752bhvomh2i.net/... removed 1 //-style comments
perf: 569 ms, diff: None, found: True
https://discworld.fandom.com/... removed 1 //-style comments
perf: 1235 ms, diff: None, found: True
https://hd-beamers.nl/... error: HTTP Error 404: Not Found
https://www.oldgroundhotelennis.com/... removed 1 //-style comments
perf: 1557 ms, diff: None, found: True
https://iibayarea.org/... removed 1 //-style comments
!!! perf: 1514 ms, diff: <html class=wf-fontawesome-n4-active wf-active><body class=home page-template-default page page-id-9><div class=site-wrapper><div id=content><a><div class=videocontainer><div class=wp-video><video>; bottom auto 0px, found: True
http://rajeoffice.rajasthan.gov.in/... removed 2 //-style comments
perf: 98 ms, diff: None, found: False
http://rajeoffice.rajasthan.gov.in/... removed 13 //-style comments
perf: 130 ms, diff: None, found: False
http://rajeoffice.rajasthan.gov.in/... removed 2 //-style comments
perf: 117 ms, diff: None, found: True
https://webportal.malatya.bel.tr/... error: Message: Reached error page
https://webportal.malatya.bel.tr/... error: Message: Reached error page
https://www.studycbsenotes.com/... removed 37 //-style comments
perf: 1323 ms, diff: None, found: True
http://aktivist.pl/... removed 1 //-style comments
perf: 2022 ms, diff: None, found: True
https://www.gw-werkzeuge.de/... removed 1 //-style comments
perf: 607 ms, diff: None, found: True
https://hourstores.com/... removed 1 //-style comments
perf: 113 ms, diff: None, found: False
http://virtual.upsin.edu.mx/... removed 1 //-style comments
perf: 1378 ms, diff: None, found: True
https://www.deltachildren.com/... error: HTTP Error 404: Not Found
https://milkbbi.com/... removed 1 //-style comments
perf: 244 ms, diff: None, found: False
https://www.blinds-uk.net/... removed 1 //-style comments
perf: 2089 ms, diff: None, found: True
https://www.discountuniverse.com/... removed 3 //-style comments
perf: 808 ms, diff: None, found: False
http://jntuh.ac.in/... removed 4 //-style comments
perf: 1289 ms, diff: None, found: False
http://jntuh.ac.in/... removed 4 //-style comments
perf: 1313 ms, diff: None, found: False
https://www.glittertw.com/... removed 3 //-style comments
perf: 629 ms, diff: None, found: False
https://www.estudioone.com.ar/... removed 1 //-style comments
perf: 382 ms, diff: None, found: True
??? https://www.estudioone.com.ar/... error: 'utf-8' codec can't decode byte 0xed in position 13018: invalid continuation byte
http://www.vubridge.fr/... removed 1 //-style comments
error: TypeError: document.body is null
step1@http://www.vubridge.fr/fr/FRhome.php:115:9
runChecked@http://www.vubridge.fr/fr/FRhome.php:57:13
go@http://www.vubridge.fr/fr/FRhome.php:161:5
@http://www.vubridge.fr/fr/FRhome.php:163:1
@http://www.vubridge.fr/fr/FRhome.php:1:2
https://justfont.com/... removed 1 //-style comments
perf: 503 ms, diff: None, found: False
http://brannmannen.no/... removed 1 //-style comments
perf: 2180 ms, diff: None, found: True
http://www.analyse-sectorielle.fr/... removed 5 //-style comments
perf: 1057 ms, diff: None, found: False
https://www.mazda.es/... error: HTTP Error 404: Not Found
https://sukhothai.in/... removed 1 //-style comments
perf: 2155 ms, diff: None, found: True
https://www.lib.auth.gr/... removed 1 //-style comments
perf: 869 ms, diff: None, found: True
https://www.legourmand.de/... removed 6 //-style comments
perf: 1607 ms, diff: None, found: True
https://store.barefootbooks.com/... removed 1 //-style comments
perf: 1165 ms, diff: None, found: True
https://www.thedivorceangels.com/... removed 1 //-style comments
perf: 3164 ms, diff: None, found: False
https://www.collegeinvest.org/... removed 8 //-style comments
perf: 1012 ms, diff: None, found: True
http://privlaw.ru/... removed 1 //-style comments
perf: 1723 ms, diff: None, found: False
http://www.cssedan-ardennes.com/... removed 1 //-style comments
perf: 673 ms, diff: None, found: False
http://www.cssedan-ardennes.com/... removed 66 //-style comments
perf: 623 ms, diff: None, found: False
http://www.cssedan-ardennes.com/... removed 13 //-style comments
perf: 726 ms, diff: None, found: False
http://www.cssedan-ardennes.com/... removed 9 //-style comments
perf: 638 ms, diff: None, found: False
http://www.cssedan-ardennes.com/... removed 10 //-style comments
perf: 613 ms, diff: None, found: False
http://www.cssedan-ardennes.com/... removed 42 //-style comments
perf: 624 ms, diff: None, found: False
http://www.cssedan-ardennes.com/... removed 1 //-style comments
perf: 808 ms, diff: None, found: False
https://clients.netafraz.com/... removed 1 //-style comments
perf: 340 ms, diff: None, found: True
https://webwatch.or.kr:50010/... removed 1 //-style comments
perf: 722 ms, diff: None, found: True
http://aerodynamika.ru/... removed 1 //-style comments
perf: 3312 ms, diff: None, found: False
https://hoscar.cl/... removed 1 //-style comments
perf: 567 ms, diff: None, found: True
https://hoscar.cl/... removed 1 //-style comments
perf: 528 ms, diff: None, found: True
https://www.bestonlinereviews.com/... removed 1 //-style comments
perf: 3108 ms, diff: None, found: False
https://www.omc-stepperonline.com/... error: HTTP Error 404: Not Found
https://www.edises.it/... removed 1 //-style comments
perf: 3006 ms, diff: None, found: True
http://www.jsndi.jp/... removed 1 //-style comments
perf: 1080 ms, diff: None, found: True
https://www.cambrian.edu.bd/... removed 1 //-style comments
perf: 1299 ms, diff: None, found: True
https://ibi-k57.ac.id/... removed 2 //-style comments
!!! perf: 977 ms, diff: <html class= js no-touch><body><div id=wrapper-header><div class=container><div class=sixteen columns><div id=slider><div class=flexslider><div class=flex-viewport>; border-block-end-color rgb(86, 86, 86) rgb(53, 53, 53), found: True
https://archives.michaelsantos.com/... removed 5 //-style comments
perf: 4291 ms, diff: None, found: False
http://www.lesagitesdubocal.fr/... removed 1 //-style comments
perf: 1439 ms, diff: None, found: False
https://www.fndshop.co.uk/... removed 1 //-style comments
perf: 1786 ms, diff: None, found: False
https://uregister.panteion.gr/... removed 2 //-style comments
perf: 187 ms, diff: None, found: True
https://www.unika.com.ro/... removed 1 //-style comments
perf: 1641 ms, diff: None, found: True
https://www.dangtintoanquoc.com/... removed 1 //-style comments
perf: 2532 ms, diff: None, found: True
http://alabama.stridestart.com/... removed 1 //-style comments
perf: 216 ms, diff: None, found: False
https://i.ugo-studios.com/... removed 1 //-style comments
perf: 272 ms, diff: different imports, found: True
=== same CSS as on http://saihousou.site/; missing font import
https://i.ugo-studios.com/... removed 1 //-style comments
perf: 244 ms, diff: None, found: True
http://www.momocart.co.kr/... removed 1 //-style comments
perf: 320 ms, diff: None, found: True
http://www.ciniba.edu.pl/... removed 7 //-style comments
!!! perf: 1459 ms, diff: <html class= supports csstransforms3d csstransformspreserve3d>; block-size 3842.77px 3834.77px, found: True
https://apps.texor.com/... removed 1 //-style comments
!!! perf: 120 ms, diff: <html><body>; background-image none url("https://apps.texor.com/TexorImages/lace2.gif"), found: True
http://lrbloggar.se/... removed 5 //-style comments
perf: 257 ms, diff: None, found: True
https://www.autoz.com.br/... removed 1 //-style comments
perf: 2164 ms, diff: None, found: True
https://dbcoin.io/... removed 1 //-style comments
perf: 699 ms, diff: None, found: True
http://www.coolmark.nl/... removed 1 //-style comments
perf: 941 ms, diff: None, found: True
https://philanthropynewyork.org/... removed 2 //-style comments
perf: 1666 ms, diff: None, found: False
http://pay.oaxray.com/... removed 2 //-style comments
perf: 231 ms, diff: None, found: True
https://gsafsd.service-now.com/... removed 2 //-style comments
perf: 1106 ms, diff: None, found: False
http://hp.masuda-med.or.jp/... removed 1 //-style comments
perf: 623 ms, diff: None, found: False
https://myportal.rossu.edu/... removed 8 //-style comments
perf: 153 ms, diff: None, found: False
https://cuulis.cm8solutions.fi/... removed 7 //-style comments
perf: 196 ms, diff: None, found: True
https://www.rguunion.co.uk/... removed 2 //-style comments
perf: 1347 ms, diff: None, found: True
https://my.discovergy.com/... removed 1 //-style comments
perf: 235 ms, diff: None, found: True
??? https://tdobu.ru/... error: 'utf-8' codec can't decode byte 0xce in position 58558: invalid continuation byte
??? https://pfj.ru/... error: 'utf-8' codec can't decode byte 0xee in position 25096: invalid continuation byte
http://www.capk.org/... removed 2 //-style comments
perf: 1287 ms, diff: None, found: False
https://www.lcs.k12.wi.us/... removed 1 //-style comments
perf: 1010 ms, diff: None, found: True
https://www.eurotierce.be/... removed 2 //-style comments
perf: 1156 ms, diff: None, found: True
https://studentaffairs.lmu.edu/... removed 1 //-style comments
perf: 815 ms, diff: None, found: True
https://www.chocolatiers.fr/... removed 1 //-style comments
perf: 2681 ms, diff: None, found: True
http://alashainasy.kz/... removed 1 //-style comments
perf: 2080 ms, diff: None, found: True
http://allfilmi.com/... removed 2 //-style comments
!!! perf: 2049 ms, diff: <html>; block-size 873px 861px, found: True
http://www.inb.gov.br/... removed 4 //-style comments
perf: 1079 ms, diff: None, found: True
http://www.inb.gov.br/... removed 2 //-style comments
perf: 1070 ms, diff: None, found: True
http://awesoft.ru/... removed 1 //-style comments
perf: 909 ms, diff: None, found: True
https://map.aidsvu.org/... removed 2 //-style comments
perf: 821 ms, diff: None, found: True
https://map.aidsvu.org/... removed 2 //-style comments
perf: 672 ms, diff: None, found: False
https://www.adaremanor.com/... removed 3 //-style comments
perf: 6700 ms, diff: None, found: False
https://www.adaremanor.com/... removed 2 //-style comments
perf: 6992 ms, diff: None, found: False
https://www.adaremanor.com/... removed 2 //-style comments
perf: 6879 ms, diff: None, found: False
https://www.adaremanor.com/... removed 2 //-style comments
perf: 6352 ms, diff: None, found: False
https://www.adaremanor.com/... removed 2 //-style comments
perf: 6758 ms, diff: None, found: False
https://floorshop.com.ua/... removed 5 //-style comments
!!! perf: 1665 ms, diff: <html><body class=><div class=container><div class=content row><article id=content class=col-sm-12><div class=box-main box-main-featured><div class=category-slide><div id=cat-feautured class=owl-carousel owl-theme owl-responsive-1000 owl-loaded><div class=owl-stage-outer><div class=owl-stage><div class=owl-item active><div class=item><div class=sticker>; inline-size 45px 51px, found: True
https://funient.com/... removed 1 //-style comments
perf: 961 ms, diff: None, found: True
http://refpedi.hu/... removed 3 //-style comments
perf: 1363 ms, diff: None, found: True
https://www.guiatenis.com/... removed 1 //-style comments
perf: 946 ms, diff: None, found: True
https://www.muse-1.net/... removed 2 //-style comments
perf: 189 ms, diff: None, found: False
http://gturp.spb.ru/... removed 1 //-style comments
perf: 563 ms, diff: None, found: False
https://pictures.royalsociety.org/... removed 1 //-style comments
perf: 350 ms, diff: None, found: True
https://agence.clubmed.fr/... removed 3 //-style comments
perf: 717 ms, diff: None, found: True
??? http://www.bhfudbal.ba/... error: 'utf-8' codec can't decode byte 0x93 in position 39153: invalid start byte
https://profizoo.cz/... removed 2 //-style comments
perf: 835 ms, diff: None, found: True
https://d10store.com/... removed 1 //-style comments
perf: 3869 ms, diff: None, found: True
https://www.bscu.org/... removed 4 //-style comments
perf: 3336 ms, diff: None, found: True
https://av-saimincekas.com/... removed 1 //-style comments
perf: 729 ms, diff: None, found: False
https://www.freshessays.com/... removed 3 //-style comments
perf: 3540 ms, diff: None, found: True
https://www.brit-method2.com/... removed 2 //-style comments
!!! perf: 296 ms, diff: <html><body><div class=header><div class=container><div class=row><div class=col-md-4 top-forms>; block-size 349.15px 381.15px, found: True
https://zambia.co.zm/... removed 5 //-style comments
perf: 1151 ms, diff: None, found: False
https://www.osiguranik.com/... removed 1 //-style comments
perf: 1170 ms, diff: None, found: True
https://m-1global.com/... removed 1 //-style comments
perf: 2126 ms, diff: None, found: True
http://manga.umn.fun/... removed 1 //-style comments
perf: 1092 ms, diff: None, found: True
https://www.leadrs.nl/... removed 2 //-style comments
perf: 476 ms, diff: None, found: True
http://pinheirense.com.br/... removed 1 //-style comments
!!! perf: 6353 ms, diff: <html class=no-js><body class=breakpoint-1024><div class=container><div class=row box-cabecalho hidden-xs hidden-sm>; inline-size 1170px 1140px, found: True
https://ramuk.intertekconnect.com/... removed 1 //-style comments
perf: 112 ms, diff: None, found: True
https://jobs.assp.org/... removed 1 //-style comments
perf: 1147 ms, diff: None, found: True
http://naminouegu.jp/... removed 1 //-style comments
perf: 299 ms, diff: None, found: True
https://www.kellykettleusa.com/... removed 3 //-style comments
perf: 1267 ms, diff: None, found: True
http://www.orangebuoy.net/... removed 1 //-style comments
perf: 1325 ms, diff: None, found: True
https://www.teppich.de/... removed 1 //-style comments
perf: 626 ms, diff: None, found: False
https://www.irenesbastelzimmer.de/... removed 4 //-style comments
perf: 1211 ms, diff: None, found: False
https://www.altajuris.com/... removed 5 //-style comments
perf: 1418 ms, diff: None, found: False
https://www.tower-health.co.uk/... removed 2 //-style comments
perf: 860 ms, diff: None, found: True
http://www.firmarehberiizmir.com/... no regex match
http://www.chateau-louis.jp/... removed 3 //-style comments
perf: 98 ms, diff: None, found: True
http://elriego.com/... removed 6 //-style comments
!!! perf: 3382 ms, diff: <html class= js csstransitions>; block-size 5047.58px 5097.58px, found: True
https://www.familyplanning2020.org/... removed 2 //-style comments
perf: 8514 ms, diff: None, found: False
https://compramais.pt/... removed 2 //-style comments
perf: 2372 ms, diff: None, found: True
https://www.ekomenu.be/... removed 1 //-style comments
perf: 960 ms, diff: None, found: True
https://pcrecruiter2.cfstaffing.com/... removed 1 //-style comments
perf: 459 ms, diff: None, found: True
https://profizoo.sk/... removed 2 //-style comments
perf: 838 ms, diff: None, found: True
https://myvacuumparts.com.au/... removed 4 //-style comments
perf: 1777 ms, diff: None, found: True
https://www.chintaistyle.jp/... removed 4 //-style comments
perf: 1281 ms, diff: None, found: False
https://gentinel.net/... removed 5 //-style comments
!!! perf: 1018 ms, diff: <html><body class=page-homepage pageType-ContentPage template-pages-layout-landingLayout2Page pageLabel-homepage language-ja><div id=pageG><div id=header class=clearfix>; overflow visible hidden, found: True
http://www.ctmall.com.tw/... removed 1 //-style comments
!!! perf: 829 ms, diff: <html><body id=index><div id=wrapper><div id=header class=r_edit><div class=header--mainnav><ul class=clearfix><li><div class=header--mainnav__markup header--mainnav__temp>; block-size auto 180px, found: True
http://www.ctmall.com.tw/... removed 2 //-style comments
!!! perf: 857 ms, diff: <html><body id=index><div id=wrapper><div class=top r_edit><div class=top_inner><ul><li>; background-image none url("http://www.ctmall.com.tw/images/icon/cart_b.png"), found: True
https://khs.ksdr1.net/... removed 1 //-style comments
!!! perf: 1426 ms, diff: <html class=no-js><body class=home hom_page-template-default page page-id-15><div id=k-body><div class=container><div class=row no-gutter section-paint><div class=col-lg-4 col-md-12 col-sm-12 col-xs-12><div class=col-padded><ul class=list-unstyled clear-margins><li class=widget-container><ul class=list-unstyled><li class=recent-news-wrap news-no-summary><div class=recent-news-content clearfix><figure class=recent-news-thumb><a><img class=attachment-thumbnail size-thumbnail wp-post-image>; transition-property all none, found: True
http://www.meguiars.com.mx/... removed 4 //-style comments
!!! perf: 7165 ms, diff: <html class=yes-js js_active js js no-touch csstransforms3d csstransitions js_active vc_desktop vc_transform vc_transform vc_transform sidebysidepage><body class=home page-template-default page page-id-106 index woocommerce-js woocommerce-wishlist woocommerce woocommerce-page wpb-js-composer js-comp-ver-4.12 vc_responsive loaded><div id=pageContent><section class=content><div class=container><div class=row><aside class=col-md-12 col-lg-12 col-xl-12 id=centerColumn><article id=post-106 class=post-106 page type-page status-publish hentry><div class=entry-content><div class=vc_row wpb_row vc_row-fluid kswr_pnone kswr_mnone kswr_bnone><div class=wpb_column vc_column_container vc_col-sm-12><div class=vc_column-inner ><div class=wpb_wrapper><div class=wpb_revslider_element wpb_content_element><div class=forcefullwidth_wrapper_tp_banner id=rev_slider_3_1_forcefullwidth><div id=rev_slider_3_1_wrapper class=rev_slider_wrapper fullwidthbanner-container><div id=rev_slider_3_1 class=rev_slider fullwidthabanner revslider-initialised tp-simpleresponsive rev_redraw_on_blurfocus><div class=tp-bannertimer tp-bottom>; inline-size 507.2px 863.783px, found: True
https://alipasplatinum.com.vn/... removed 1 //-style comments
perf: 891 ms, diff: None, found: False
http://www.gociss.ru/... removed 1 //-style comments
perf: 852 ms, diff: None, found: True
https://www.stronger247.com/... removed 1 //-style comments
perf: 926 ms, diff: None, found: True
http://ikibeach.com/... removed 1 //-style comments
perf: 935 ms, diff: None, found: False
https://www.slashcam.de/... removed 1 //-style comments
perf: 1162 ms, diff: None, found: True
https://www.icsi.edu/... removed 1 //-style comments
perf: 1775 ms, diff: None, found: True
http://victorypro.ru/... removed 1 //-style comments
!!! perf: 254 ms, diff: <html><body><div class=><div id=content><div class=container><div class=row><div class=container><div class=onl_login><div class=row onl_row-sm-offset-3 onl_socialButtons><div class=col-xs-6 .col-md-4><a class=btn btn-lg btn-block onl_btn-twitter>; opacity 1 0.9, found: True
https://www.skagitcounty.net/... removed 10 //-style comments
perf: 1136 ms, diff: None, found: True
https://www.skagitcounty.net/... removed 10 //-style comments
perf: 1112 ms, diff: None, found: True
http://studiodansemontreal.com/... removed 1 //-style comments
perf: 113 ms, diff: None, found: True
http://www.games2rule.com/... removed 1 //-style comments
perf: 1285 ms, diff: None, found: True
http://www.frscan.com/... removed 1 //-style comments
perf: 684 ms, diff: None, found: True
http://pogodawkratke.pl/... removed 1 //-style comments
perf: 604 ms, diff: None, found: True
https://icprint.uni-bamberg.de/... removed 3 //-style comments
!!! perf: 292 ms, diff: <html><body><table><tbody><tr><td><table class=border_gelb><tbody><tr><td><div class=ueb><div><a>; border-block-end-color rgb(0, 0, 238) rgb(76, 76, 76), found: True
http://schooart.weebly.com/... removed 1 //-style comments
perf: 739 ms, diff: None, found: False
https://bigeastakitarescue.org/... removed 1 //-style comments
perf: 2417 ms, diff: None, found: True
https://seed69.com/... removed 2 //-style comments
perf: 786 ms, diff: None, found: True
https://seed69.com/... removed 2 //-style comments
perf: 786 ms, diff: None, found: True
https://seed69.com/... removed 2 //-style comments
perf: 777 ms, diff: None, found: True
https://thematstore.com/... removed 5 //-style comments
perf: 781 ms, diff: None, found: True
https://www.imotim.com.tr/... removed 1 //-style comments
!!! perf: 2065 ms, diff: <html class= js flexbox flexboxlegacy><body class=common-home ondragstart=><div class=outer-wrapper><div class=site-wrapper><header class=hidden-xs hidden-sm id=header><div class=container><div class=row><div class=col-sm-8><div class=col-sm-7 col-lg-7 col-md-7 col-xs-12><div class= autosearch-wrapper><form><div id=search0 class=input-group><input class=search_query form-control>; border-block-end-color rgb(51, 51, 51) rgb(49, 49, 49), found: True
http://mananius.com/... removed 1 //-style comments
!!! perf: 1502 ms, diff: <html><body class= pace-running><div class=mCustomScrollbar>; block-size 4663px 4640px, found: True
https://bursa.diyanet.gov.tr/... removed 2 //-style comments
!!! perf: 1545 ms, diff: <html><body class= ms-backgroundImage><form id=aspnetForm><div id=s4-workspace><div id=s4-bodyContainer><div class=body-content><div class=main-container container><div><span id=DeltaPlaceHolderMain><div><div><div class=ms-webpart-zone ms-fullWidth><div id=MSOZoneCell_WebPartctl00_ctl35_g_d816a17b_e77e_4f82_b9e5_0dee4182ea73 class=s4-wpcell-plain ms-webpartzone-cell ms-webpart-cell-vertical ms-fullWidth ><div class=ms-webpart-chrome ms-webpart-chrome-vertical ms-webpart-chrome-fullWidth ><div id=WebPartctl00_ctl35_g_d816a17b_e77e_4f82_b9e5_0dee4182ea73 class=ms-WPBody noindex ><div id=ctl00_ctl35_g_d816a17b_e77e_4f82_b9e5_0dee4182ea73><div class=ayet-hadis-dua><div class=ahd-boxes><div class=ayet><div class=aht-bottom><div class=social-btns-holder><div class=social-btns><div class=jssocials-shares>; margin-block-end 0px 2.8px, found: True
http://www.saintmarks.org/... removed 1 //-style comments
perf: 1691 ms, diff: None, found: True
http://dmu.cl/... removed 1 //-style comments
perf: 1306 ms, diff: None, found: True
https://www.outdoorxl.dk/... removed 3 //-style comments
perf: 35908 ms, diff: None, found: True
http://bangchongloa.com/... removed 1 //-style comments
perf: 3321 ms, diff: None, found: True
http://scribewinery.com/... removed 1 //-style comments
!!! perf: 265 ms, diff: <html class= js flexbox canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers no-applicationcache svg inlinesvg smil svgclippaths><body class=home page-template page-template-template-home page-template-template-home-php page page-id-5><div class=wrapper><header class=header clear>; inset-inline-end 0px auto, found: True
https://www.dynatech.de/... removed 5 //-style comments
!!! perf: 3293 ms, diff: <html class=cufon-active linux-magic svg-magic cufon-ready><body class= cms-index-index cms-home><div class=wrapper><div class=inner-wrapper><div class=page><div class=header-container><div class=header-dynadesign><div class=header><div class=search-header><form id=search_mini_form class=searchautocomplete UI-SEARCHAUTOCOMPLETE><div class=form-search>; block-size 34.75px 28.2167px, found: True
https://xenos.posterwebshop.com/... removed 1 //-style comments
perf: 382 ms, diff: None, found: True
https://jkms.org/... removed 2 //-style comments
perf: 1546 ms, diff: None, found: False
https://www.yanaka-coffeeten.com/... removed 1 //-style comments
!!! perf: 1576 ms, diff: <html><body class=home page-template-default page page-id-123 p-home><div id=storage-cart class=cart ui-draggable ui-resizable>; padding-block-start 0px 10px, found: True
http://pclamdong.evnspc.vn/... error: Message: Timeout loading page after 300000ms
https://www.tommasi.com.br/... removed 1 //-style comments
perf: 599 ms, diff: None, found: False
http://rimsntires.com/... removed 1 //-style comments
perf: 774 ms, diff: None, found: True
https://console.rhombussystems.com/... removed 1 //-style comments
perf: 84 ms, diff: None, found: False
http://www.jogging-plus.com/... removed 8 //-style comments
perf: 2708 ms, diff: None, found: True
https://www.ece.utah.edu/... removed 1 //-style comments
!!! perf: 8872 ms, diff: <html><body class=front-page><div class=fixed-wrapper><div id=header-rs class=window-fixed><div class=scroll-slow><div class=forcefullwidth_wrapper_tp_banner><div id=rev_slider_1_1_wrapper class=rev_slider_wrapper fullwidthbanner-container><div id=rev_slider_1_1 class=rev_slider fullwidthabanner revslider-initialised tp-simpleresponsive><ul class=tp-revslider-mainul><li class=tp-revslider-slidesli active-revslide>; opacity 1 0, found: True
https://www.ece.utah.edu/... removed 1 //-style comments
perf: 1254 ms, diff: None, found: False
https://mbcshack.com/... removed 2 //-style comments
perf: 680 ms, diff: None, found: False
http://sites.kidstv.co.il/... removed 1 //-style comments
perf: 297 ms, diff: None, found: True
https://econet-trading.jp/... removed 4 //-style comments
perf: 5216 ms, diff: None, found: True
http://www.ph.vccs.edu/... removed 1 //-style comments
perf: 1054 ms, diff: None, found: True
https://senhorverdugo.com/... removed 1 //-style comments
perf: 1894 ms, diff: None, found: True
https://senhorverdugo.com/... removed 1 //-style comments
perf: 1681 ms, diff: None, found: True
https://www.bhimupi.org.in/... error: Message: Reached error page
https://datacomp.sk/... removed 3 //-style comments
!!! perf: 2381 ms, diff: <html><body><div id=maincont class=><div class=outercont><div class=innercont><div class=wrapcont><div id=centercont><div class=centerout><div class=centerin><div id=webnews><div id=art_list><div class=art_perex_news><div class=art_perex>; clear both none, found: False
http://touhoudougamatome.blog.fc2.com/... removed 1 //-style comments
!!! perf: 2034 ms, diff: <html><body><div id=outline_main><div id=main-first><div id=main><div class=blogroll_wrapper>; background-color rgba(0, 0, 0, 0) rgb(247, 247, 247), found: True
=== neither better nor worse, different gray colors
https://campingbil.net/... removed 4 //-style comments
perf: 1938 ms, diff: None, found: False
https://www.thecivilengineer.org/... removed 1 //-style comments
perf: 961 ms, diff: None, found: True
??? http://aragonsubastas.com/... error: 'utf-8' codec can't decode byte 0xe1 in position 283: invalid continuation byte
https://in-pachet.ro/... removed 2 //-style comments
perf: 1197 ms, diff: None, found: True
https://dilimotors.com.ua/... removed 2 //-style comments
perf: 780 ms, diff: None, found: True
https://tuncayreklam.com/... removed 1 //-style comments
perf: 1059 ms, diff: None, found: True
https://www.firstbeerclub.ru/... removed 1 //-style comments
perf: 331 ms, diff: None, found: True
http://shopping-happylife.com/... removed 2 //-style comments
perf: 410 ms, diff: different imports, found: True
=== same CSS as on http://saihousou.site/; missing font import
http://shopping-happylife.com/... removed 1 //-style comments
perf: 381 ms, diff: None, found: True
http://www.vlk.lt/... removed 1 //-style comments
!!! perf: 1195 ms, diff: <html><body class= ms-backgroundImage><form id=aspnetForm><div id=s4-workspace><div id=s4-bodyContainer><div class=wrapper><div id=contentRow><div id=contentBox>; block-size 1138.2px 1129.2px, found: True
https://www.norway101.com/... removed 1 //-style comments
perf: 354 ms, diff: None, found: True
https://www.drim.es/... removed 1 //-style comments
perf: 3976 ms, diff: None, found: False
??? http://www.vynomeka.lt/... error: 'utf-8' codec can't decode byte 0xfe in position 156: invalid start byte
http://midtownrichardson.com/... removed 1 //-style comments
perf: 217 ms, diff: None, found: True
https://tour-dubai.com/... removed 1 //-style comments
perf: 3363 ms, diff: None, found: True
https://www.ifpg.org/... removed 1 //-style comments
perf: 1825 ms, diff: None, found: True
https://www.gateshonda.net/... removed 1 //-style comments
perf: 1900 ms, diff: None, found: True
https://the-selection.jp/... removed 5 //-style comments
!!! perf: 254 ms, diff: <html><body><div id=contents>; padding-inline-end 0px 12.6667px, found: True
http://www.centralfloridazoo.org/... removed 1 //-style comments
!!! perf: 2278 ms, diff: <html class=js flexbox flexboxlegacy canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths fa-events-icons-ready><body class=home page-template page-template-home page-template-home-php page page-id-4><section id=mainTopMenu><nav><div class=collapse navbar-collapse id=navbar-menu><div class=menu-main-menu-container><ul id=menu-main-menu class=nav navbar-nav><li id=menu-item-134 class=donate-menu-item menu-item menu-item-type-post_type menu-item-object-page menu-item-134><a class=menu-image-title-after><span class=menu-image-title>; border-block-end-color rgb(255, 255, 255) rgb(0, 0, 0), found: True
=== slight breakage, "//padding: 30px 125px 25px 70px; color: #fff;" on a main menu
https://www.bibliocraftmod.com/... removed 1 //-style comments
perf: 1598 ms, diff: None, found: True
http://agappe.com/... removed 1 //-style comments
perf: 278 ms, diff: None, found: True
http://agappe.com/... removed 1 //-style comments
perf: 286 ms, diff: None, found: True
http://www.freelocaldates.com/... removed 1 //-style comments
perf: 815 ms, diff: None, found: False
https://www.jtbthailand.com/... removed 1 //-style comments
perf: 1452 ms, diff: None, found: True
http://diszkertem.hu/... removed 1 //-style comments
perf: 1510 ms, diff: None, found: True
https://bookstore.palmer.edu/... removed 1 //-style comments
perf: 593 ms, diff: None, found: True
https://www.eposcomputer.com/... removed 2 //-style comments
perf: 3299 ms, diff: None, found: True
http://www.ofijus.net/... removed 1 //-style comments
perf: 2585 ms, diff: None, found: True
http://www.pousadapordosol.com.br/... removed 1 //-style comments
perf: 825 ms, diff: None, found: True
https://pro.guidesocial.be/... removed 1 //-style comments
!!! perf: 1609 ms, diff: <html class=js><body id=hp class=modal-open><div id=overlay_mosaic>; opacity 0.500132 0.8, found: False
=== false positive due to JS
http://www.1sourcecomponents.com/... removed 2 //-style comments
perf: 684 ms, diff: None, found: True
http://www.supertronindia.com/... removed 1 //-style comments
perf: 621 ms, diff: None, found: True
https://www.vsekioski.ru/... removed 2 //-style comments
perf: 974 ms, diff: None, found: True
https://tdinteres.ru/... removed 1 //-style comments
perf: 1458 ms, diff: None, found: True
http://namseoul.org/... removed 5 //-style comments
perf: 1462 ms, diff: None, found: True
http://namseoul.org/... removed 5 //-style comments
perf: 1349 ms, diff: None, found: True
http://namseoul.org/... removed 5 //-style comments
perf: 1346 ms, diff: None, found: True
https://www.himotiv.com/... removed 10 //-style comments
perf: 756 ms, diff: None, found: True
https://developer.byu.edu/... removed 57 //-style comments
perf: 676 ms, diff: None, found: True
import sys
import traceback
import re
import csv
import ssl
import time
from collections import namedtuple
from urllib.error import HTTPError
from urllib.request import Request, urlopen
import attr
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.common.exceptions import TimeoutException
Page = namedtuple('Page', ['url', 'sheet_url'])
def main():
pages = []
with open('results-20190320-233046.csv', newline='') as csvfile:
for line in csv.DictReader(csvfile):
pages.append(Page(url=line['page'], sheet_url=line['url']))
driver = webdriver.Firefox()
ua = driver.execute_script('return navigator.userAgent')
ssl_ctx = ssl.create_default_context()
ssl_ctx.check_hostname = False
ssl_ctx.verify_mode = ssl.CERT_NONE
regex = re.compile(r"((^|[^/]\*/)[^/]*?(/[^*][^/]*?)*?([^:\"'\(*]|^))//([^;\"'\)\{\}\n]*\n[ \t]*[^ \t\}]|[^;\"'\)\n]*;[^;\n)]*;[^\{\}\n]*(\n|$))")
start_from = None
# disabling JS is probably very sensible, since it avoids differences due to JS-driven animations.
# adblockers could speed up testing (but are perhaps redundant with disabled JS).
input("If needed, configure the browser (e.g. by disabling JavaScript). Press enter to start.")
cons_errors = 0
for page in pages:
if start_from is not None:
if page.url != start_from:
continue
start_from = None
print(f'{page.url}... ', end='', flush=True)
try:
driver.implicitly_wait(20)
driver.get(page.url)
driver.implicitly_wait(0)
assert '.css' in page.sheet_url
req = Request(page.sheet_url, headers={
'User-Agent': ua,
'Referer': page.url
})
orig_css = urlopen(req, context=ssl_ctx).read().decode('utf-8', 'replace')
css = orig_css
n_comments = 0
def repl(m):
nonlocal n_comments
n_comments += 1
full = m.group(0)
prefix = m.group(1)
newline = full.find('\n', len(prefix))
if newline == -1:
newline = len(full)
return prefix + full[newline:]
css = regex.sub(repl, css)
if css == orig_css:
print("no regex match")
continue
while True:
new_css = regex.sub(repl, css)
if new_css == css:
break
css = new_css
print(f"removed {n_comments} //-style comments")
driver.execute_script('''
var sheet_url = arguments[0];
var css_before = arguments[1];
var css_after = arguments[2];
function go() {
var t0;
var found = false;
var node = null;
var imports1, imports2;
var allNodes;
var before;
function findImports(sheet) {
var ret = [];
for (var i = 0, l = sheet.cssRules.length; i < l; i++) {
var rule = sheet.cssRules[i];
if (rule instanceof CSSImportRule) {
ret.push(rule.href);
}
else if (rule instanceof CSSGroupingRule) {
ret = ret.concat(findImports(rule));
}
}
return ret;
}
function allStyles() {
var seen = new Set();
var ret = [];
for (var el of allNodes) {
if (seen.has(el.desc)) continue;
seen.add(el.desc);
// ugh, this sometimes gets used values... but what can you do
var a = getComputedStyle(el), ar = [];
for (var i = 0, l = a.length; i < l; i++)
ar.push(a[a[i]]);
ret.push([ar.join(''), ar, el]);
}
return ret;
}
function describe2(el) {
if (!el || el == document) return '';
var ret = '<' + el.localName;
for (var i = 0; i < el.attributes.length; i++) {
if (el.attributes[i].name.toLowerCase() == 'id' ||
el.attributes[i].name.toLowerCase() == 'class') {
ret += " " + el.attributes[i].name + "=" + el.attributes[i].value;
}
}
return describe2(el.parentNode) + ret + '>';
}
function runChecked(f) {
try {
f();
} catch(e) {
console.log(e);
window.retValue = {error: e + "\\n" + e.stack};
}
}
function step1() {
console.log("step 1");
t0 = performance.now();
// Remove existing style sheet if it exists
function recSheet(sheet) {
if (!sheet) return false;
if (sheet.href == sheet_url) {
if (sheet.ownerNode) {
sheet.ownerNode.remove();
}
found = true;
return true;
}
try {
for (var i = 0, l = sheet.cssRules.length; i < l; i++) {
var rule = sheet.cssRules[i];
if (rule instanceof CSSImportRule) {
if (recSheet(rule.styleSheet)) {
sheet.deleteRule(i);
l--, i--;
continue;
}
}
if (rule instanceof CSSGroupingRule) {
recSheet(rule);
}
}
} catch(e) { /* we'll have to skip non-same-origin @import rules */ }
return false;
}
for (let sheet of [].slice.call(document.styleSheets)) recSheet(sheet);
// Name all nodes
allNodes = [].slice.call(document.querySelectorAll("*"));
function describe(el) {
var ret = el.tagName;
for (var i = 0; i < el.attributes.length; i++) {
ret += " " + el.attributes[i].name + "=" + el.attributes[i].value;
}
return ret;
}
document.desc = '';
for (var el of allNodes) {
el.desc = el.parentNode.desc + "," + describe(el);
}
node = document.createElement("style");
node.textContent = css_before;
node.onload = node.onerror = () => runChecked(step2);
document.body.appendChild(node);
console.log("end step 1");
// Wait for the load event, to pick up @import's. (Downside: we pick
// up dynamic JS changes as well, due to asynchronicity. Should really
// do this again synchronously if there are no @import changes.
}
function step2() {
console.log("step 2");
imports1 = findImports(node.sheet).join(',');
before = allStyles();
node.remove();
node = document.createElement("style");
node.onload = node.onerror = (ev) => runChecked(step3, ev);
node.textContent = css_after;
document.body.appendChild(node);
console.log("end step 2");
}
function step3() {
console.log("step 3");
imports2 = findImports(node.sheet).join(',');
var after = allStyles();
var diff = null;
if (imports1 != imports2) diff = "different imports";
else {
for (var i = 0; i < before.length; i++) {
if (before[i][0] != after[i][0]) {
var st = getComputedStyle(after[i][2]);
diff = describe2(before[i][2]);
for (var j = 0; j < st.length; j++) {
if (before[i][1][j] != after[i][1][j]) {
diff += "; " + st[j] + " " + before[i][1][j] + " " + after[i][1][j];
break;
}
}
break;
}
}
}
node.remove();
var perf = performance.now() - t0;
window.retValue = {perf, diff, found};
console.log("end step 3");
}
runChecked(step1);
}
go();
''', page.sheet_url, orig_css, css)
wait = WebDriverWait(driver, 10)
ret = wait.until(lambda b: b.execute_script("return window.retValue"))
if 'error' in ret:
print(f"error: {ret['error']}")
else:
print(f"perf: {ret['perf']} ms, diff: {ret['diff']}, found: {ret['found']}")
cons_errors = 0
except Exception as e:
print(f"error: {e}")
if not isinstance(e, (HTTPError, TimeoutException, ConnectionResetError)):
traceback.print_exc()
cons_errors += 1
if cons_errors > 5:
print("Too many errors, stopping.")
break
driver.close()
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment