Tiny Tiny RSS: Community

Feature request: copy article address

I often found myself wanting to share an article by url, and found a bit cumbersome to show it in a box like it’s now. Can we have, at some unspecified point in the future, some way to copy it directly to the clipboard?

why not make a plugin? also copying things to clipboard is not that simple, i think.

I don’t know, the easier way should be to just shift+rightclick on the article title and the use the browser contextual menu.

but it should be cool to have this directly in the interface.

I created or copied (I don’t remember now) a plugin that adds the link to the article footer so I could easily use the browser’s context menu to open or copy the link without conflicting with the tt-rss context menu on the title.

Hopefully I won’t annoy anyone by including it here in its entirety:

<?php
class printurl extends Plugin {
  private $host;

  function about() {
    return array(1.0,
      "prints the URL of the article in the button row on the left side",
      "user",
      false);
  }

  function init($host) {
    $this->host = $host;
    $host->add_hook($host::HOOK_ARTICLE_LEFT_BUTTON, $this);
  }

  function hook_article_left_button($line) {
    $article_link = $line["link"];
    $rv = "<a href=\"{$article_link}\">Link</a> ";
    return $rv;
  }

  function api_version() {
    return 2;
  }
}