diff options
author | Andrew Dolgov <[email protected]> | 2012-11-07 13:59:59 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-11-07 13:59:59 +0400 |
commit | bb4cd19be8d1998d2b2127e183278e717cc93979 (patch) | |
tree | 629482af65ce6a8e8bce385020ff54b0ce62f585 | |
parent | c8b31978c95cb3e9f570523e9a267920159c0e52 (diff) |
digest: cleanup the code a bit
-rw-r--r-- | digest.php | 4 | ||||
-rw-r--r-- | js/digest.js | 33 |
2 files changed, 2 insertions, 35 deletions
diff --git a/digest.php b/digest.php index ee26b2124..e16421fe3 100644 --- a/digest.php +++ b/digest.php @@ -72,10 +72,10 @@ <div class="links"> - <?php if (!SINGLE_USER_MODE) { ?> + <?php if (!$_SESSION["hide_hello"]) { ?> <?php echo __('Hello,') ?> <b><?php echo $_SESSION["name"] ?></b> | <?php } ?> - <?php if (!SINGLE_USER_MODE) { ?> + <?php if (!$_SESSION["hide_logout"]) { ?> <a href="backend.php?op=logout"><?php echo __('Logout') ?></a> | <?php } ?> <a href='<?php echo get_self_url_prefix() ?>/index.php?mobile=false'> diff --git a/js/digest.js b/js/digest.js index 81dee4bd0..241328ab2 100644 --- a/js/digest.js +++ b/js/digest.js @@ -452,8 +452,6 @@ function add_headline_entry(article, feed, no_effects) { if (d.getTime() / 1000 - article.updated < fresh_max) li_class = "fresh"; - //"<img title='" + __("Share on Twitter") + "' onclick=\"tweet_article("+article.id+", true)\" src='images/art-tweet.png'>" + - //"<img title='" + __("Mark as read") + "' onclick=\"view("+article.id+", true)\" src='images/digest_checkbox.png'>" + var checkbox_part = "<input type=\"checkbox\" class=\"cb\" onclick=\"toggle_select_article(this)\"/>"; @@ -798,37 +796,6 @@ function update_title(unread) { } } -function tweet_article(id) { - try { - - var query = "?op=rpc&method=getTweetInfo&id=" + param_escape(id); - - console.log(query); - - var d = new Date(); - var ts = d.getTime(); - - var w = window.open('backend.php?op=backend&method=loading', 'ttrss_tweet', - "status=0,toolbar=0,location=0,width=500,height=400,scrollbars=1,menubar=0"); - - new Ajax.Request("backend.php", { - parameters: query, - onComplete: function(transport) { - var ti = JSON.parse(transport.responseText); - - var share_url = "http://twitter.com/share?_=" + ts + - "&text=" + param_escape(ti.title) + - "&url=" + param_escape(ti.link); - - w.location.href = share_url; - - } }); - - } catch (e) { - exception_error("tweet_article", e); - } -} - function toggle_select_article(elem) { try { var article = elem.parentNode; |