Open Simon-Tesla opened 6 years ago
Here is a diff for open-journals-in-tabs support. It is against the released 1.1.5 code; I haven't updated it for the current release.
(I also sent this via email in June 2018, but I figured I'd add it here, since I now have a Github account.)
What's in this diff:
FurAffinity and Weasyl plugins modifed to open journals (only) in tabs, when user is on the main notification page.
Eka's Portal plugin modified to open journals in tabs along with new submission, if enabled in the UI.
GFX and Shorpy plugins changed to note that they do not support journals.
Base plugin changed with stub for new getPageJournalList() function.
UI for new openJournalsMixed setting added - defaults to false (don't open journals on sites with mixed submissions and journals).
FIXME: app/plugins.base.ts and app/ui/siteActions.ts need to be changed to read the new setting and use it when calling getPageLinkList().
Testing done:
Tested with Firefox ESR 52.8.1 (64-bit), on Linux.
FurAffinity and Weasyl: Opening submissions in tabs works as before. Opening journals in tabs now works. Notification types other than new journals are ignored.
Eka's Portal: Opening submissions in tabs works as before. Opening journals along with submissions works, if the option is hard-coded on (see FIXME above).
GFX and Shorpy: Opening submissions in tabs works as before. No journal functionality.
Please feel free to submit this as a pull request when you feel it's ready.
From Eupeptic: Make Raccoony detect pages that have a list of journals, and offer to open the journal entries in tabs.
I don't think this should operate when you're looking at the journal list for one artist. It should only happen when you're looking at the "all new journals since I last logged in / cleared notifications" page.
Motivation: I follow enough critters on FA that some days I log in and there are 6 or 7 journal entries. I usually right-click each one and open it in a new tab. It Would Be Nice [tm] to automate that function. (First world problems! :) )
Some notes on implementation:
FA: I think the journal list always appears at https://www.furaffinity.net/msg/others/#journals . Each individual journal appears in an
<li>
. It might be possible to key off of the<input>
tag, or possibly the "/journal/[nnnn]" in the<a>
tag. Example:Weasyl: I think the journal list always appears at https://www.weasyl.com/messages/notifications . I don't have any current journals from my watched artists, though, so take this with a grain of salt.
I do have a streaming notification, which I think uses a similar format. It lives in a
<label>
tag. The<a>
tags are probably where you would scrape the journal from, but I probably need to have an actual journal entry, instead of a stream, to tell for sure. Example:Eka's Portal: The journal list (labeled "New Blogs") appears at the bottom of your "submissions by watched artists" page, which is https://aryion.com/g4/messagepage.php. Each blog entry notification lives inside an
<li>
, with a couple of<a>
s in it. One of the<a>
s will have a path incluing "//aryion.com/forum/blog.php?b=" in it, which might be a way to detect it. Example:The interesting thing here is that Raccoony might have to get called twice on the same page - once to run the "parse new art submissions" function, and again for the "parse new journals" function. On at least FA and Weasyl, you probably only need to run one function per page.