new Profile( spa )

Description

Class for handling the Profile page.

Parameters
Name Type Description
spa NexusHoratio.spa.SPA

SPA instance that manages this Page.

Members


dispatcher :NexusHoratio.base.Dispatcher


id :string

Details
string

logger :NexusHoratio.base.Logger


name :string

Details
string

pathname :RegExp


spa :NexusHoratio.spa.SPA


ctor :module:linkedin-tool~Page

Description

Alias for this.constructor.


scrollerClassName :string

Description

Useful default for CSS class name.


<readonly> UidMode :Symbol

Description

Different ways of computing UIDs for entry elements.

Details
Symbol

entries :NexusHoratio.nav.Scroller


sections :NexusHoratio.nav.Scroller


<private> entriesSelectorConnectedAccounts

Details

<p><a href="https://github.com/nexushoratio/userscripts/issues/392">(#392)</a> The rare self promotion offering showed up and was able to tune, but will likely need tuning for the &quot;End users&quot; variant.</p>


<private> onTablistChange

Description

Selecting a different tab triggers the Scroller watchForClicks feature, which eventually calls focus(). Since we have a Scroller based focused handler to ensure the correct tablist button has browser focus, we end up focusing on the old button.

We handle this by calling focus() again on the next JS event loop.

Methods


addService( Klass, ...rest ) → {NexusHoratio.base.Service}

Description
Parameters
Name Type Attributes Description
Klass function

A service class to instantiate. If this is a Page.Service subclass, the page property is also set.

rest object <repeatable>

Arbitrary objects to pass to constructor.

Returns

Instance of Klass.


<private> computePathnameRE( pathname ) → {RegExp}

Description

Turn a path into a RegExp.

Parameters
Name Type Description
pathname string | RegExp

A path to convert.

Returns

A converted path.


<private> waitUntilReady() → {external:Element}

Description

Wait until the page has loaded enough to continue.

Returns

The element matched by #readySelector.


cssClassName( extras ) → {string}

Description

Derive a CSS className from the name of the subclass.

Parameters
Name Type Description
extras Array.<string>

Extract strings to add to the class name.

Returns

A CSS className.


elementsHeightProcessor( elements ) → {NexusHoratio.web.StyleService~StyleProperties}

Description

A useful processor for many LIT pages.

It just sums up height of the matched elements to set a top margin.

Parameters
Name Type Description
elements NexusHoratio.web.StyleService~ElementMap

Elements to examine.

Returns

Style properties for to contribute.


Description

A useful finder for many LIT pages.

It finds the navbar and buffer for the content just below it. This is intended for use with navbarAndFriendsElementsProcessor.

The current Style-2 pages seem to be working by accident, not design. Specifically, the content?.parentElement does not work on something like Feed.

Returns

Description

A useful processor for many LIT pages.

It computes a top margin that works nicely for consistently positioning items.

Currently only tested with Style.ONE pages.

Parameters
Name Type Description
elements NexusHoratio.web.StyleService~ElementMap

Elements to examine.

Returns

Style properties for to contribute.


waitForSelectorToBeGone( selector [, timeout ] ) → {Promise.<NexusHoratio.web~Results>}

Description

Wait for matching selector to disappear.

This could possibly be rolled into NexusHoratio.web.waitForSelector.

Parameters
Name Type Attributes Default Description
selector string

CSS selector.

timeout number <optional>
0

Time to wait in milliseconds, 0 disables.

Returns

Basically, something to await on.


div( n ) → {string}

Description

Create a CSS child combinator selector of DIVs.

Parameters
Name Type Description
n number

The number of DIVs in the selector.

Returns

N divs like "div > div > ... > div".


<private> modeAttrHelperSelector( attr, ignore ) → {string}

Description

Create a CSS attribute selector with an ignore list.

Parameters
Name Type Description
attr string

Attribute.

ignore Array.<string>

Values to ignore.

Returns

CSS selector.

Examples
[x]:not([[x]="foo"]):not([x]="bar")

<private> entriesModeToUid( scroller, element, modes ) → {Map.<UidMode, string>}

Description

Compute all UIDs for the requested modes.

Parameters
Name Type Description
scroller NexusHoratio.nav.Scroller

Scroller instance.

element external:Element

Element to examine.

modes Array.<UidMode>

Computation modes to consider.

Returns

All computed values.


<private> entriesSuggestUids( scroller, element )

Description

Suggest UID sources.

Parameters
Name Type Description
scroller NexusHoratio.nav.Scroller

Scroller instance.

element external:Element

Element to examine.


<private> entriesUidFromModes( scroller, element ) → {Object}

Description

Return the first UID computed from supported modes.

Parameters
Name Type Description
scroller NexusHoratio.nav.Scroller

Scroller instance.

element external:Element

Element to examine.

Returns

How the UID was computed, and value.


<private> scrollerFinder() → {NexusHoratio.web.StyleService~ElementMap}


<private> uniqueSectionIdentifier( scroller, element ) → {string}

Parameters
Name Type Description
scroller NexusHoratio.nav.Scroller

The calling Scroller instance.

element external:Element

Element to examine.

Returns

A value unique to this element.


<private> entriesUidShim( scroller, element ) → {string}

Parameters
Name Type Description
scroller NexusHoratio.nav.Scroller

The calling Scroller instance.

element external:Element

Element to examine.

Returns

A value unique to this element.


<private> onSpaActivated( type, pages )

Parameters
Name Type Description
type string

Event type.

pages NexusHoratio.spa.Page~Pages

Updated pages information.

Events


activate


deactivate