LinkedIn Tool

Minor enhancements to LinkedIn. Mostly just hotkeys.

Tästä skriptistä on versioita, joissa koodia päivitettiin. Näytä kaikki versiot.

  • v2.5.9 15.8.2023

    Port Job section navigation to the Scroller class.

    Another easy port. Bug compatible (one thing about doing these migrations is testing more corner cases and trying to figure out if something is a new bug or an old one).

    Closes #75.

  • v2.5.8 15.8.2023

    Typo: there -> where, Put guards around this.item in shine() and dull()., Refocus on current item when returning to a page.

    Different pages have different things they need to do. Notifications are small, so they are all loaded up front, and can see it right away. Meanwhile, posts are loaded lazily, and we need to wait for the content to be present before acting on them.

    Not perfect. I am sure corner cases will show up.

    Issue #46.

  • v2.5.7 15.8.2023

    Update how we find the button for loading more comments.

    Turns out there are at least two different messages, but they share a common CSS class. So now we can use clickElement() as well.

    Closes #83.

  • v2.5.6 15.8.2023

    Remove comment.

    The request is asked for is not possible with JS.

    Closes #82., Differentiate reject messages a bit., Verify item existence before scrolling to it., Turn off debugging for the notification Scroller., Save and restore current post AND comment before loading more.

    This is not a perfect solution. If the comment is not the bottom on on the page, it will be. So a little bit of jitter. But at least in the same realm.

    Also, if the user does a lot of loads and navigating around through comments at the same time, the UI may end up scrolling elsewhere (to where new content is loading). Either focus or another navigation (comment or post), will bring it back into view.

    Closes #79.

  • v2.5.5 14.8.2023

    esline: Enable camelcase.

    Renamed some variables from snake_case to lowerCamelCase.

    Issue #68., Turn off Scroller debugging for Feed.

    Issue #75., Port Notification navigation to the Scroller class.

    This was an easy one. Unsurprising since many of the special cases Scroller was designed to handle came from Notifications.

    Issue #75.

  • v2.5.4 14.8.2023

    eslint: Add JSDoc for the Page class.

    Issue #71.

  • v2.5.3 14.8.2023

    Add @noframes userscript directive.

    Closes #81.

  • v2.5.2 14.8.2023

    Simple renaming of event from href to urlchange.

    Issue #74., Rename function from onHref to onUrlChange.

    Issue #74., Use Tampermonkey's urlchange monitoring if available.

    Closes #74., Missed some eslint directives on previous change.

    Issue #74.

  • v2.5.1 13.8.2023

    eslint: Redo otmot and otrot documentation as JSDoc.

    Issue #71., eslint: Add JSDoc for set item.

    Also improve the docs for _msg.

    Issue #71.

  • v2.5.0 13.8.2023

    Port Feed navigation to the Scroller class.

    Appears to be bug compatible with previous iteration.

    This is a big enough refactor to bump the middle version number.

    Issue #75.

  • v2.4.9 13.8.2023

    Update CSS selector to find the view reactions button.

    Closes #80.

  • v2.4.8 13.8.2023

    Add new change event type to the Scroller dispatcher.

    Issue #75., Add more logging to _scrollToCurrentItem().

    Issue #75., Add new shine() and dull() methods to Scroller.

    These will add/remove the CSS classes to the current item.

    From current post tracking stuff, we know we need to remove the highlights before attaching a ResizeObserver. See 5de89b4.

    Issue #75., Add new show() method to Scroller.

    Necessary to support otrot since will we no longer have a view specific _scrollToX().

    Issue #75.

  • v2.4.7 13.8.2023

    Rename _comment to _comments.

    This better reflects that this is a container (Scroller).

    Issue #75., Rename _activeComment to _hasActiveComment.

    Issue #75., Update initial debug message.

    Now that we are using eslint on a regular basis, and that catches parsing errors, we don't need the line to say anything about parsing.

    However, now that it is at the end of the file, I have noticed it will fail during initialization issues.

    So might as well make it about that., Create a postScroller.

    Not used anywhere yet, but this bit seems stable.

    Issue #75., Use new selector to find menu button in posts.

    Closes #78.

  • v2.4.6 12.8.2023

    eslint: Enable arrow-body-style and configure no-confusing-arrow.

    Apparently it is well known that these two do not play well together out of the box.

    As a result, also revert a change as a result of earlier linting.

    Issue #68.

  • v2.4.5 12.8.2023

    eslint: Batch of new JSDoc comments.

    Issue #71.

  • v2.4.4 12.8.2023

    Create a simple Dispatcher class.

    Issue #77., TIL: Nullish coalescing assignment, Replace parentCallback with a dispatched message.

    Migrate the comment scroller to use it.

    Closes #77.

  • v2.4.3 11.8.2023

    eslint: enable no-use-before-define.

    This did require moving some code around. No changes, just moves.

    Closes #67.

  • v2.4.2 11.8.2023

    Do not create comment scroller when no active post.

    In testing, only the first/last actions cause the script to get confused at this point. So only those are using the new activeComment property.

    Closes #76.

  • v2.4.1 11.8.2023

    Clean up: Rename clickHandler to onClick.

    And related names.

    Closes #73.

  • v2.4.0 11.8.2023

    Missing trailing semicolon., Factor out common navigation code to a new Scroller class.

    And migrated comments to using it.

    It should have most of the bits necessary to support are current corner cases. I'm sure that future ports will expose some that are missing.

    Also first foray into using JSDoc. I'm sure I'm doing some of it wrong.

    The _msg method is probably over kill, but it sure was handy in debugging. Purposefully leaving it enabled for comments for the time being.

    This is a big enough refactor that I went ahead and bumped the middle version number.

    Closes #65.

  • v2.3.3 10.8.2023

    eslint: Investigate no-ternary and address a couple of issues.

    I like the ternary operator, but agree it is not always the best solution. For instance, I just learned about the Nullish coalescing operator and think that is a better solution in some of these case flagged. But certainly not all. And there are currently enough left over to use selective disabling. So, leaving it turned off for now.

    A refactoring in progress will remove most of those, however, so when that is done, I think it will be appropriate to revisit this.

    Meanwhile, there are also a couple of similar ternary related rules and while they do not trigger on any existing code, I went ahead and enabled them.

    Issue #68.

  • v2.3.2 9.8.2023

    Reenable no-console lint check.

    I do have a habit of having to delete, or almost checking in, errant debug statements.

    Issue #66., Enable more eslint rules.

    Went through https://eslint.org/docs/latest/rules/#possible-problems and turned on ones that look useful and required minimal changes.

    Issue #66.

  • v2.3.1 9.8.2023

    Change accident var to const., Remove unnecessary local variable., Address easy to deal with eslint errors.

    Issue #66., Fix bug introduced by 2df7434a.

    Found by eslint. Missed because we do not yet support any views on longer URLs. Well, that and because lack of tests.

    Closes #66.

  • v2.3.0 8.8.2023

    Implement load more sections with the l key.

    Necessary when the window is narrowed and autoloading becomes disabled.

    Closes #64.

  • v2.2.0 8.8.2023

    Implement jumping to first/last section on the Jobs page.

    Closes #61., Make description for the other first/last keys consistent.

  • v2.1.3 7.8.2023

    Implement a quick hash to use for identifying notification cards.

    Not used yet. Still need to handle the case of deleted cards.

    Issue #60., Switch notifications to using a unique identifier for cards.

    Notifications cards are a pain. Different variations, the elements change out from under us, and when deleted, no identifying marks at all.

    Still, this seems to work.

    Close #60.

  • v2.1.2 7.8.2023

    Handle Enter more carefully.

    Closes #54.

  • v2.1.1 7.8.2023

    Factor out the code for focussing on the sidebar.

    Issue #57.

  • v2.1.0 7.8.2023

    Move the + n onto the previous line., Make post navigation looping include the sidebar.

    Issue #57., Make notification card navigation looping include the sidebar.

    I'm starting to see a pattern here.

    Closes #57.

  • v2.0.2 7.8.2023

    Switch posts and comments to tracking via a unique identifier.

    This will (mostly) track posts between feed views.

    Upon returning to the feed, if the previous post was not in the currently loaded posts, it won't be found, and will reset to the top post. But maybe that is something we can revisit in the future.

    Closes #59., Bump version number.

  • v2.0.1 7.8.2023

    Update stuff about browser focus.

    • Factor out how we save and restore tabindex
    • Add focus support to notifications
    • Make help screen wording consistent

    Closes #58., Bump version number.

  • v2.0.0 7.8.2023

    Support the /jobs/ page.

    Not perfect, but is usable.

    User can navigate up and down through the sections and focus on the current section and TAB through items.

    Supporting a new page warrants a bump in the major version number.

    Closes #56.

  • v1.10.6 6.8.2023

    Reduce jitter when jumping to the last post.

    Turns out that posts at the end are loaded lazily as they scroll into view. So jumping to the last one can be a chaotic experience.

    Now just jump to the last fill post, and let the next ones start filling up.

    Closes #53.

  • v1.10.5 6.8.2023

    Remove jitter when explicitly loading more posts.

    LinkedIn's UI will explicitly jump to the new posts at the end of the page when loading. Now detect when the containing div changes size before scrolling back to our own idea of the current post.

    Now the user can use l to load more posts while reading, and do so multiple times while leisurely scrolling through currently loaded posts.

    Unfortunately this does not handle the case when going to the last post with > and autoloading kicks in. Since autoloading may or may not kick in, handling that case may be different.

  • v1.10.4 6.8.2023

    Removed errant debug statement., Fix issue where the initial next post goes to the second post.

    The incr+mod approach works nice for looping once already established. But that first time in needs a little hand holding.

    Another approach would be, if the first action is next post, to set current index to posts.length instead of -1, but the math works out the same way.

    Closes #52.

  • v1.10.3 6.8.2023

    Rewrite how we monitor for url changes.

    Previously we were monitoring every single element added/removed to the web page and using that as an execuse to check to see if the URL changed.

    Now we know that div.authentication-outlet is sufficient. So use otmot to monitor for that special div to show up, then register a long lived MutationObserver to it.

    I had hoped that we could monitor only that div's direct descendents changing as the pages are being rewritten. However, those particular elements are removed and new ones added before the URL is updated (in many cases). As a result, we miss the change.

    We could revisit and restrict this MO to the smaller subset, and if we create a more thorough only until the URL changes., Remove errant debug statement., Remove jitter from toggle+next action.

    Use a ResizeObserver to detect when the toggled post collapses and scroll back to the current post.

    I'm not sure how this works so well. I expected there to be more jitter, but at least ending up at the right place.

    I suspect that things just happened to get queued the right way so all updates are resolved before the next screen refresh. Pure luck, but I'll take it.

    There can still be a little bit of jitter as rendering of letters seems to occasionally shift a pixel or two. This may be related to the scrollbar resizing when elements are reduced in size, and then subsequent adjustements by the engine. But they are very minor, especially compared to the previous jitter.

    Closes #17.

  • v1.10.1 5.8.2023

    Rewrite how we detect the height of the navbar.

    There was no functional need for this particular rewrite. Instead, it is a prepatory refactor for upcoming changes.

    Specifically, it is learning how to tie together Promises and MutationObservers.

    Issues #17, #46.

  • v1.10.0 5.8.2023

    Implement P to go to the Start a post share box.

    Does not start anything, just scrolls it into view and gives focus. The user can then start writing a post there, or TAB to one of the other items to start creating something.

    Closes #34.

  • v1.9.0 5.8.2023

    Fix issue where first k will visit next-to-last post.

    Closes #51., Support Load previous replies button.

    When reading comments, use that button first, if not present, then the Load more comments button.

    Closes #30.

  • v1.8.1 4.8.2023

    Remove errant debug statement., Switch notification activation from a to Enter.

    An incompatible change, but it seems to make more sense.

    Closes #50., Implement click-to-visit on notifications.

    Not that it works all that well. Clicking all notifications I currently have is the same as activating it. So by the time we receive the click, all of the notifications have already been removed, so unable to find it for tracking purposes. When the user comes back to the page, nothing can be found.

    The only thing that keeps the notification around is clicking on the menu.

    Closes #47.

  • v1.7.0 4.8.2023

    Implement ability to jump to first or last post loaded.

    When in the middle, and want to get to and end fast, here you go.

    Issue #48., Implement ability to jump to first or last notification loaded.

    Closes #48.

  • v1.6.0 4.8.2023

    Implement l to load more notifications.

    Closes #49.

  • v1.5.0 4.8.2023

    Do scroll to top of post if no comment is selected.

    It turns out that if the user reads a lot of comments, then scrolls back to the top of the post, the user cannot easily read the post again. We simply don't scroll in that situation.

    We want to keep from scrolling in the situation where the users requests more comments when in the middle of reading some. But not when they scroll off the top.

    Issue #28., Let users loop through loaded comments.

    When visiting a post, p will go to the last loaded comment. When visiting the last loaded comment, n will go to the top of the post.

    Issue #29., Let users loop through loaded posts.

    On initial load, no post is selected, and j would take the user to the first post. Now, in that state, k will take the user to the last post. While on the first or last post, they will go to the opposite end (unlike comments, which will take the user back to the containing post). A little bit inconsisent, but I think appropriate.

    One current problem is, when visiting the last post, it will often the UI to load more posts. This loading will interfere with keeping the current post in view. This problem exists else where as well, so a common solution will be needed. However, once posts are loaded, navigating up or down then back will get to the correct post.

    Issue #29., Let users loop through notifications.

    Closes #29.

  • v1.4.0 3.8.2023

    Minor tweak to how missing notifications are logged., The View N Jobs notification can also be activated by a link.

    Switch to using that to simplify the code.

    I suspect, but do not yet know, this will work for most, if not all, notifications. But need more examples first.

    Issue #42., A debugging alert.

    Hopefully I'll trigger this soon before I forget about it.

    Issue #42., Implement X to toggle a notification deletion (like hiding a post).

    This is certainly much faster than = TAB RET.

    Moved undeleting a notification from = to X for consistency.

    Issue #35.

  • v1.3.0 3.8.2023

    More precise selector catches better anchors.

    Lots of investigation for a simple improvement.

    Issue #42.

  • v1.2.0 3.8.2023

    Implement v r to view an item's reactions.

    Issue #23.

  • v1.1.0 3.8.2023

    Implement v p to view a post directly.

    Not happy with it, as it currently causes a page reload. Hopefully can figure that out in the future.

    Issue #23.

  • v1.0.3 2.8.2023

    Factor out common button clicking pattern.

    Code is a little easier to read, and avoids the possibility of doing something like undefined.click().

    Closes #38.

  • v1.0.2 2.8.2023

    Wrap most querySelectorAll with Array.from and avoid Array.prototype.func.call.

    It does make the code look cleaner.

    Closes #37.

  • v1.0.1 2.8.2023

    Change uses of findIndex to indexOf.

    Issue #37.

Näytä kaikki skriptin versiot.