Page 2 of 5

Trimming URL for Saving to Pocket

Posted: 02 Apr 2013, 19:08
by WSMcG
Noticed when trying to save a Penny Arcade Reports URL to Pocket that the URL ends up with a couple of tabs at the beginning and end. This is an error on the Pocket save screen until they are removed.

In pocket.js, replacing

Code: Select all

ti.link
with

Code: Select all

ti.link.trim()
does the trick, at least on Chrome 26.

I also added

Code: Select all

        if(!String.prototype.trim) {
          String.prototype.trim = function () {
            return this.replace(/^\s+|\s+$/g,'');
          };
        }

to the beginning of the function to help improve compatibility with older browsers, although I don't know if they will even run TT-RSS. I also haven't really tested it, so YMMV.

Is there a proper bug tracker for TT-RSS?

Re: Trimming URL for Saving to Pocket

Posted: 02 Apr 2013, 19:11
by fox
>Is there a proper bug tracker for TT-RSS?

Hoo boy.

Edit: to add, the plugin is no longer in trunk, so don't file bugs against it.

Re: Trimming URL for Saving to Pocket

Posted: 02 Apr 2013, 19:16
by WSMcG
I guess I'm missing something regarding bug trackers... anyway, was this the right way to bring this up?

Re: Trimming URL for Saving to Pocket

Posted: 02 Apr 2013, 19:21
by fox
There's a thread in the themes forum, you can post the updated zip (or a fix) there I suppose.

Or I or some other mod can merge the threads.

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Posted: 03 Apr 2013, 11:04
by aurelieng
sandebert wrote:I think I've found a small typo in the Pocket plugin, probably due to using the Twitter plugin as base for it. (Might be in more of them, haven't checked.)

pocket.js

Code: Select all

      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");

...should probably be something like...

Code: Select all

      var w = window.open('backend.php?op=backend&method=loading', 'ttrss_pocket',
         "status=0,toolbar=0,location=0,width=500,height=400,scrollbars=1,menubar=0");


The string of the exception below should also probably be updated from

Code: Select all

exception_error("tweetArticle", e);


to

Code: Select all

exception_error("pocketArticle", e);


Btw, is it possible to have the pocket icon next to article headlines (eg. next to the star icon), so that there's no need to show the article content to be able to add it to pocket?

Best,

Aurel.

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Posted: 03 Apr 2013, 11:37
by bmar
I've modified googleplus plugin to make posts to vk.com. Does anybody need it? :)

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Posted: 03 Apr 2013, 11:54
by Andyt8
@fox: do you post a new version of twitter or/and googleplus plugin? Both isn't included in TT-RSS 1.7.6 as before and the attached files on first post are older...

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Posted: 03 Apr 2013, 12:19
by fox
Not sure how they could be older (older than what?) because I pulled them from trunk.

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Posted: 03 Apr 2013, 12:33
by Andyt8
I mean it work only for older TT-RSS Version - I tried Twitter and Google+ and they don't work with TT-RSS 1.7.6....

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Posted: 03 Apr 2013, 12:37
by fox
Just tried g+ from the zip and it seems to work fine on trunk.

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Posted: 03 Apr 2013, 13:04
by Andyt8
You mean the zip-files which are attached in first post? They don't work for me. What do you exactly mean with "work fine on trunk"?

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Posted: 03 Apr 2013, 15:59
by fox
Be more specific. What happens when you unzip the plugin and enable it?

Trunk means development head version I use, which is mostly equal to 1.7.6 at this point.

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Posted: 04 Apr 2013, 11:01
by Andyt8
After downloading, unzip and uploading to TT-RSS Webspace - the plugin isn't available through TT-RSS plugin settings.

So I looked to the file and changed one small point:

Code: Select all

   function about() {
      return array(1.0,
         "Share article on Twitter",
         "fox");
   }

to

Code: Select all

   function about() {
      return array(1.0,
         "Share article on Twitter",
         "fox",
         false);
   }


After uploading the changed file, I was able to enable the plugin and it work again as in TT-RSS 1.7.5. Hopefully, I'm now more specific?

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Posted: 04 Apr 2013, 13:33
by fox
Right, this might have been changed recently. It would be great if you attached the updated zips, I'll reattach them to the first post then.

(Well either that or I'll do it sometime later I guess)

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Posted: 04 Apr 2013, 14:42
by Andyt8
Ok, at the moment I use only tweet and googleplus. If you have less time, I'm able to do a short fix to the other plugins later this week.