vov-mobile

Check-in [fc4e7554c5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merge branch 'master' of github.com:vandys/vov-mobile fixed header alignment
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:fc4e7554c510b77f85e4dcaa38a3bc39111f97afeb9da2850e18e58b4ffe9b71
User & Date: snowneck@gmail.com 2016-07-29 19:32:49
Context
2016-08-10
22:26
font size test check-in: d68cdf5c9c user: snowneck@gmail.com tags: master, trunk
2016-07-29
19:32
Merge branch 'master' of github.com:vandys/vov-mobile fixed header alignment check-in: fc4e7554c5 user: snowneck@gmail.com tags: master, trunk
19:22
broke the tables check-in: c6f77f61d3 user: snowneck@gmail.com tags: master, trunk
19:19
Merge branch 'master' of https://github.com/vandys/vov-mobile Conflicts: index.html check-in: cc55f8d3e5 user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to imgs.js.

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
function bandown(evt) {
    if (pressX == null) {
	touch_handle = "mousemove";
	touch_handler = banmove;
	slider.addEventListener("mousemove", banmove);
	pressX = evt.pageX;
    }

}
// Touch down
function bantdown(evts) {
    if (evts.targetTouches.length != 1) {
	return;
    }
    if (pressX == null) {
................................................................................
	var evt = evts.targetTouches[0];

	touch_handle = "touchmove";
	touch_handler = bantmove;
	slider.addEventListener("touchmove", bantmove);
	pressX = evt.pageX;
    }

}

// Mouse up or off screen
function bandone() {
    if (pressX != null) {
	slider.removeEventListener(touch_handle, touch_handler);
	pressX = touch_handle = touch_handler = null;







>







 







>







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
function bandown(evt) {
    if (pressX == null) {
	touch_handle = "mousemove";
	touch_handler = banmove;
	slider.addEventListener("mousemove", banmove);
	pressX = evt.pageX;
    }
    evt.stopPropagation();
}
// Touch down
function bantdown(evts) {
    if (evts.targetTouches.length != 1) {
	return;
    }
    if (pressX == null) {
................................................................................
	var evt = evts.targetTouches[0];

	touch_handle = "touchmove";
	touch_handler = bantmove;
	slider.addEventListener("touchmove", bantmove);
	pressX = evt.pageX;
    }
    evts.stopPropagation();
}

// Mouse up or off screen
function bandone() {
    if (pressX != null) {
	slider.removeEventListener(touch_handle, touch_handler);
	pressX = touch_handle = touch_handler = null;

Changes to index.html.

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
..
96
97
98
99
100
101
102

103
104
105

<audio id="radio1"></audio>
<script src="radio.js"></script>

<div class="shadowed" style="text-align: center; background: #1a75ff;">
<table class="padded" style="width: 100%;">
<tr>
  <td width="30%"></td>
  <td width= "40%">

<h1
  style="background: white; text-align: center; color: #1a75ff;
    font-weight: bold; font-size: large"
>KVSH<br>101.9<br>FM</h1>
  </td>
  <td width="30%"></td>
</tr>
<tr>

  <td width="auto" style="color: black; text-align: center; font-size: large">
   KVSH-LP - Voice of Vashon
  </td>
</tr>
</table>

<table class="padded" style="width: 100%;">
<tr>
  <td width=10%"></td>

................................................................................
</iframe>

</td>
</tr>
</table>

<script src="imgs.js"></script>


</body>
</html>







|
|






|


>
|
<
|







 







>



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
..
96
97
98
99
100
101
102
103
104
105
106

<audio id="radio1"></audio>
<script src="radio.js"></script>

<div class="shadowed" style="text-align: center; background: #1a75ff;">
<table class="padded" style="width: 100%;">
<tr>
  <td width="10%"></td>
  <td width="80%">

<h1
  style="background: white; text-align: center; color: #1a75ff;
    font-weight: bold; font-size: large"
>KVSH<br>101.9<br>FM</h1>
  </td>
  <td width="10%"></td>
</tr>
<tr>
<td width="10%"></td>
  <td id="nptext" width="80%" style="color: black; text-align: center; font-size: large">

<td width="10%"></td>
</tr>
</table>

<table class="padded" style="width: 100%;">
<tr>
  <td width=10%"></td>

................................................................................
</iframe>

</td>
</tr>
</table>

<script src="imgs.js"></script>
<script src="nowplaying.js"></script>

</body>
</html>

Added nowplaying.js.



































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
43
44
45
46
47
48
49
//
// nowplaying.js
//	Keep the "nptext" area updated with tracks from KVSH
//

function ajax_http_get(url, callback) {
    var req = null;
    try {
        req = new XMLHttpRequest();
    }
    catch (e) {
	alert("Your browser does not support AJAX!");
	return false;
    }
    req.open("GET", url, true);
    req.onreadystatechange = function() {
        if (req.readyState == 4) {
            callback(req);
        }
    }
    req.send(null);
}

function fetch_next(ver) {
    ajax_http_get("http://voiceofvashon.org:8888/nowplaying?ver="+ver, test_handle);
}

function test_handle(req) {
    // Response is <new-ver#>\n<history-body>
    var t = req.responseText
    var idx = t.indexOf("\n")
    if (idx == -1) {
	// alert("Malformed response");
	// Incomplete read; probably page reloading
	return false;
    }

    // Write current playing text into "nptext" area
    var elem = document.getElementById('nptext')
    elem.textContent = t.substr(idx+1)


    // <new-ver#> is used to wait for future change
    var ver = t.substr(0,idx)
    fetch_next(ver)
}

// Kick off initial content fetch
fetch_next("0");