blob: 3a765a5ff91cabe6aaf2437d0c98fece74ea0600 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<!DOCTYPE html>
<!--
* Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this
* source code is governed by a BSD-style license that can be found in the
* LICENSE file.
-->
<html>
<head>
<style>
html {
height: 40px;
}
body {
background: #fffddd;
font: 16px Arial;
height: 100%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-pack: center;
}
em {
font-weight: bold;
font-style: normal;
}
</style>
</head>
<body>
<div id="wrap">
The word <em>sandwich</em> appears <em id="count">X</em> times on this
page.
</div>
<script>
// Obtain the count of sandwiches from the page URL.
var count = window.location.hash.substring(1);
if (count) {
// Replace the placeholder text with the actual count.
var domcount = document.querySelector('#count');
domcount.innerText = count;
}
</script>
</body>
</html>
|