Jump to content
Nytro

NoScript detection with CSS

Recommended Posts

Posted

NoScript detection with CSS

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Test</title>
</head>
<iframe src="detection.html" width="180" id="testframe"></iframe>
<script type="text/javascript">
document.getElementById("testframe").style.width = "400px";
</script>
</html>

detection.html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>detection</title>
<style type="text/css">
.active {
display:none;
}

.notactive {
display:block;
}

@media screen and (max-width: 200px) {
.active {
display:block;
}
.notactive {
display:none;
}
}

</style>
</head>
<body>
<div class="active">Noscript is active</div>
<div class="notactive">Noscript is not active</div>
</body>

</html>

Sursa: Test

Tricky... :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...