some reverts
This commit is contained in:
parent
5d3be078b4
commit
01cb207b65
4 changed files with 20 additions and 31 deletions
|
@ -165,7 +165,6 @@ canvas {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#list p {
|
#list p {
|
||||||
|
@ -285,23 +284,18 @@ canvas {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#full article header p:nth-child(2) {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
#full article header p:nth-child(3) {
|
#full article header p:nth-child(3) {
|
||||||
clear: both;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
#full .article {
|
#full .article {
|
||||||
clear: both;
|
clear: both;
|
||||||
padding-top: 1em;
|
padding-top: 1em;
|
||||||
padding-bottom: 2.8em;
|
padding-bottom: 3em;
|
||||||
font-size: 1.3em;
|
font-size: 1.3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#full footer.bar {
|
#full footer.bar {
|
||||||
bottom: 0;
|
|
||||||
margin: auto 0 0 0;
|
margin: auto 0 0 0;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
height: 3.8em;
|
height: 3.8em;
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
<link rel="stylesheet" href="css/screen.css" />
|
<link rel="stylesheet" href="css/screen.css" />
|
||||||
|
|
||||||
<script src="js/App.js"></script>
|
<script src="js/App.js"></script>
|
||||||
|
<script src="js/TinyTinyRSS.js"></script>
|
||||||
|
<script src="js/OwnCloud.js"></script>
|
||||||
<script src="js/Pond.js"></script>
|
<script src="js/Pond.js"></script>
|
||||||
<script src="js/md5.js"></script>
|
<script src="js/md5.js"></script>
|
||||||
<script src="js/Login.js"></script>
|
<script src="js/Login.js"></script>
|
||||||
|
@ -62,7 +64,14 @@
|
||||||
<p class="smallogo">
|
<p class="smallogo">
|
||||||
<img src="img/icon-128.png" alt="Logo, an ape head">
|
<img src="img/icon-128.png" alt="Logo, an ape head">
|
||||||
</p>
|
</p>
|
||||||
|
<p class="backends">
|
||||||
|
<label class="button"><input type="radio" name="backend" value="TinyTinyRSS" checked="checked" /> Tiny Tiny RSS</label>
|
||||||
|
<label class="button"><input type="radio" name="backend" value="OwnCloud" /> ownCloud News</label>
|
||||||
|
<label class="button"><input type="radio" name="backend" value="Pond" /> Pond</label>
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
<label for="url">URL:</label>
|
||||||
|
<input class="button" type="text" name="url" id="url" value="" placeholder="http://example.com/tt-rss/" />
|
||||||
<label for="un">Username:</label>
|
<label for="un">Username:</label>
|
||||||
<input class="button" type="text" name="user" id="un" value="" placeholder="username" />
|
<input class="button" type="text" name="user" id="un" value="" placeholder="username" />
|
||||||
<label for="pw">Password:</label>
|
<label for="pw">Password:</label>
|
||||||
|
|
24
js/App.js
24
js/App.js
|
@ -7,16 +7,6 @@ function App() {
|
||||||
if(!color) color = "red";
|
if(!color) color = "red";
|
||||||
this.setColor(color);
|
this.setColor(color);
|
||||||
this.fontChange();
|
this.fontChange();
|
||||||
|
|
||||||
var _this = this;
|
|
||||||
|
|
||||||
window.onkeydown = function(e) {
|
|
||||||
if(e.keyCode == 39) {
|
|
||||||
_this.showNext();
|
|
||||||
} else if(e.keyCode == 37) {
|
|
||||||
_this.showPrevious();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
App.prototype.authenticate = function() {
|
App.prototype.authenticate = function() {
|
||||||
|
@ -27,12 +17,9 @@ App.prototype.after_login = function(backend) {
|
||||||
/*
|
/*
|
||||||
var request = window.navigator.mozApps.getSelf();
|
var request = window.navigator.mozApps.getSelf();
|
||||||
request.onsuccess = function() {
|
request.onsuccess = function() {
|
||||||
if(request.result) {
|
$("#version").innerHTML = request.result.manifest.version;
|
||||||
$("#version").innerHTML = request.result.manifest.version;
|
|
||||||
}
|
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
|
||||||
window.onhashchange = function(e) {
|
window.onhashchange = function(e) {
|
||||||
|
@ -289,8 +276,8 @@ App.prototype.showFull = function(article, slide_back) {
|
||||||
|
|
||||||
$(page_id + " .date").innerHTML = (new Date(parseInt(article.updated, 10) * 1000)).toLocaleString();
|
$(page_id + " .date").innerHTML = (new Date(parseInt(article.updated, 10) * 1000)).toLocaleString();
|
||||||
|
|
||||||
var title = $(page_id + " .link");
|
var title = $(page_id + " .title");
|
||||||
title.innerHTML = article.link;
|
title.innerHTML = article.title;
|
||||||
title.href = article.link;
|
title.href = article.link;
|
||||||
|
|
||||||
$(page_id + " .feed_title").innerHTML = article.feed_title;
|
$(page_id + " .feed_title").innerHTML = article.feed_title;
|
||||||
|
@ -299,10 +286,7 @@ App.prototype.showFull = function(article, slide_back) {
|
||||||
if(article.author && article.author.length > 0)
|
if(article.author && article.author.length > 0)
|
||||||
$(page_id + " .author").innerHTML = "– " + article.author;
|
$(page_id + " .author").innerHTML = "– " + article.author;
|
||||||
|
|
||||||
|
$(page_id + " .article").innerHTML = article.content;
|
||||||
var content = article.content
|
|
||||||
if(content.replace(/^\s+|\s+$/g,'').length == 0) content = article.title;
|
|
||||||
$(page_id + " .article").innerHTML = content.urlify();
|
|
||||||
$$(page_id + " .article a").forEach(function(o, i) {
|
$$(page_id + " .article a").forEach(function(o, i) {
|
||||||
o.target = "_blank";
|
o.target = "_blank";
|
||||||
});
|
});
|
||||||
|
|
|
@ -46,7 +46,7 @@ Pond.prototype.doOperation = function(method, operation, new_options, callback)
|
||||||
body = a.join("&");
|
body = a.join("&");
|
||||||
}
|
}
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest({mozSystem: true});
|
||||||
xhr.onreadystatechange = function() {
|
xhr.onreadystatechange = function() {
|
||||||
if(xhr.readyState == 4) {
|
if(xhr.readyState == 4) {
|
||||||
if(xhr.status == 200) {
|
if(xhr.status == 200) {
|
||||||
|
@ -76,7 +76,7 @@ Pond.prototype.reload = function(callback) {
|
||||||
|
|
||||||
Pond.prototype.getUnreadFeeds = function(callback, skip) {
|
Pond.prototype.getUnreadFeeds = function(callback, skip) {
|
||||||
var options = {
|
var options = {
|
||||||
status: "unread",
|
status: "all",
|
||||||
limit: 100
|
limit: 100
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -134,6 +134,8 @@ Pond.prototype.normalizeArticle = function(article) {
|
||||||
|
|
||||||
var timestamp = new Date(article.published_at).getTime() / 1000;
|
var timestamp = new Date(article.published_at).getTime() / 1000;
|
||||||
|
|
||||||
|
console.log(article.read)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: article.id,
|
id: article.id,
|
||||||
guid_hash: article.url + article.id,
|
guid_hash: article.url + article.id,
|
||||||
|
@ -207,7 +209,7 @@ Pond.login = function(server_url, user, password, callback) {
|
||||||
var password_hash = md5(user + ':' + password)
|
var password_hash = md5(user + ':' + password)
|
||||||
var options = "username=" + user.toLowerCase() + "&" + "password=" + password_hash;
|
var options = "username=" + user.toLowerCase() + "&" + "password=" + password_hash;
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest({mozSystem: true});
|
||||||
xhr.onreadystatechange = function() {
|
xhr.onreadystatechange = function() {
|
||||||
if(xhr.readyState == 4) {
|
if(xhr.readyState == 4) {
|
||||||
if(xhr.status == 201) {
|
if(xhr.status == 201) {
|
||||||
|
|
Reference in a new issue