Skip to content

Commit 3716bb5

Browse files
committed
Update RSS Reader
(cherry picked from commit 6060109)
1 parent 800ccc2 commit 3716bb5

File tree

2 files changed

+191
-163
lines changed

2 files changed

+191
-163
lines changed

2-rss/www/index.html

100755100644
+12-13
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,28 @@
1010

1111
<script>
1212
// CHANGE YOUR URL HERE!
13-
Feed.feedUrl = "http://feeds.bbci.co.uk/news/technology/rss.xml";
13+
var feedUrl = "http://feeds.bbci.co.uk/news/technology/rss.xml";
1414

1515
$(function() {
16-
Feed.watchClick();
17-
Feed.load();
1816

17+
var feed = new Feed({
18+
url: feedUrl
19+
});
20+
1921
if (monaca.isIOS) {
2022
$('.toolbar').css('margin-top', '20px');
2123
$('.button').css('top', '20px');
2224
}
2325

24-
});
25-
26-
document.addEventListener("deviceready", onDeviceReady, false);
27-
function onDeviceReady() {
28-
// Enable reload button
29-
monaca.updateUIStyle("reload-button", "disable", false);
30-
31-
$( ".button" ).click(function() {
26+
$('.button').click(function() {
3227
console.log('Reload.');
33-
Feed.load();
28+
feed.load();
3429
});
35-
}
30+
31+
feed.load();
32+
33+
});
34+
3635
</script>
3736
</head>
3837
<body>

0 commit comments

Comments
 (0)