Experimental hook handler for javascript

Development-related discussion, including bundled plugins
User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Experimental hook handler for javascript

Postby fox » 24 Apr 2013, 19:51

Long awaited, etc. Please suggest useful hooks, I'm sort of not sure what is needed here.

https://github.com/gothfox/Tiny-Tiny-RS ... ab388c8c42
https://github.com/gothfox/Tiny-Tiny-RS ... fdaedcc3eb

macfly
Bear Rating Disaster
Bear Rating Disaster
Posts: 82
Joined: 27 Mar 2013, 23:07

Re: Experimental hook handler for javascript

Postby macfly » 25 Apr 2013, 00:30

personally, i'd like a hook after cdmExpandArticle finished.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Experimental hook handler for javascript

Postby fox » 25 Apr 2013, 10:09

[master 2779e22] js: add collapsed and expanded hooks

macfly
Bear Rating Disaster
Bear Rating Disaster
Posts: 82
Joined: 27 Mar 2013, 23:07

Re: Experimental hook handler for javascript

Postby macfly » 26 Apr 2013, 14:15

this rocks. I just changed the auto_embed_original and was able to remove those ugly javascript-function-overload

Will there be a hook for feed-settings to implement new attributes for feeds?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Experimental hook handler for javascript

Postby fox » 26 Apr 2013, 14:24

This is more of a PHP thing I guess.

https://github.com/gothfox/Tiny-Tiny-RS ... 9707dd3647
https://github.com/gothfox/Tiny-Tiny-RS ... a591ad5488

The idea is, you add additional parameters / dlgSec sections to the form and parse and save them in the SAVE hook. I think this should work okay.

macfly
Bear Rating Disaster
Bear Rating Disaster
Posts: 82
Joined: 27 Mar 2013, 23:07

Re: Experimental hook handler for javascript

Postby macfly » 26 Apr 2013, 15:54

works like a charme, see http://tt-rss.org/forum/viewtopic.php?f=22&t=1830&p=9798#p9798

any chance, i can get a hook for editfeeds and a hook @editsaveops where $batch is true?

( i know, i can't get enough of this ....)

thanks,
macfly.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Experimental hook handler for javascript

Postby fox » 26 Apr 2013, 15:56

I dunno, it's technically entirely possible, but for some reason I thought screwing with batch editing is a bad idea. Not really sure why.

I'll think about it.

macfly
Bear Rating Disaster
Bear Rating Disaster
Posts: 82
Joined: 27 Mar 2013, 23:07

Re: Experimental hook handler for javascript

Postby macfly » 26 Apr 2013, 16:44

:-)

Elvizz
Bear Rating Trainee
Bear Rating Trainee
Posts: 4
Joined: 27 Apr 2013, 18:17
Location: Germany

Re: Experimental hook handler for javascript

Postby Elvizz » 29 Apr 2013, 00:37

How about a hook when the article state changed? (Starred/unstarred, read/unread, tag added, ...)

Especially the read/unread hook would come in handy for my new "mark as read" plugin. But I guess, there would be more uses for this.

macfly
Bear Rating Disaster
Bear Rating Disaster
Posts: 82
Joined: 27 Mar 2013, 23:07

Re: Experimental hook handler for javascript

Postby macfly » 01 May 2013, 01:01

hi fox,

i noticed (to be honest, user taclm did), that the hook HOOK_ARTICLE_EXPANDED is only called when "Combined feed display" is set to true. Any chance, that the hook is called, when "Combined feed display" is set to false? Or do i have to trigger on a different hook, depending on the display mode?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Experimental hook handler for javascript

Postby fox » 01 May 2013, 15:28

>i noticed (to be honest, user taclm did), that the hook HOOK_ARTICLE_EXPANDED is only called when "Combined feed display" is set to true.

That is somehow surprising to you?

>Any chance, that the hook is called, when "Combined feed display" is set to false?

There's no expanding going on then, doesn't it?

macfly
Bear Rating Disaster
Bear Rating Disaster
Posts: 82
Joined: 27 Mar 2013, 23:07

Re: Experimental hook handler for javascript

Postby macfly » 01 May 2013, 15:39

hm, yes, when thinking about, you're right.

but the article-window gets an update. Whats about an HOOK_ARTICLE_WINDOW_UPDATED or something like this? The hook HOOK_ARTICLE_RENDERED does not help, because its called at load-time from db, not at display-time in the browser.

Saliency
Bear Rating Trainee
Bear Rating Trainee
Posts: 49
Joined: 27 Mar 2013, 20:05

Re: Experimental hook handler for javascript

Postby Saliency » 08 May 2013, 20:59

If it is not already in tt-rss I would also like a article state changed js hook.


Return to “Development”

Who is online

Users browsing this forum: No registered users and 2 guests