Description

This is the main class for the popup window that shows when user clicks extension icon. This class is responsible for:

  • saving/restoring persistent data and
  • rendering the menu panel

This popup view can easily be extended to display other content, but currently it renders the menu panel only.

Details

Classes


Members


<static> pinned

Description

Get pinned links

Returns
Details

<static> unpinned

Description

Get unpinned links

Returns
Details

<static> recent

Description

Get recent links

Returns
Details

<static> activeView

Description

Get the view that is currently active in the Popup

Returns
Details

<static> renderTarget

Description

Get DOM element where to render content. This will also clear all existing children from that element, meaning you can always assume this element is empty.

Details

Methods


<static> drawCurrentView()

Description

Draw the currently active view in the render target.

Details

<static> onPinToggle( key )

Description

Handler for when user pins/unpins a link.

Parameters
Name Type Description
key String

id of the pin that was clicked

Details

<static> onPinOrderChange( newOrder, callback )

Description

Handler for when user rearranges pins, update and save new pin order.

Parameters
Name Type Attributes Description
newOrder Array.<String>

list of link ids and their new order

callback function <nullable>

callback function (optional); specify this callback if you need to perform some action after new order has been persisted.

Details

Description

Get menu links

Returns
Details

<static> getRecent()

Description

Get recently used links

Returns
Details