Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4123868
providerActions.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
695 B
Referenced Files
None
Subscribers
None
providerActions.js
View Options
const
{
CommandPaletteItem
,
CommandPaletteNavigateAction
,
CommandPaletteNoneAction
}
=
require
(
'../types.js'
);
/**
* Returns a navigation action result based on the item's URL.
*
* This is primarily used for keyboard-driven selections (e.g., Enter key),
* as clicks on items with URLs are handled by standard browser behavior on `<a>` tags.
*
* @param {CommandPaletteItem} item The selected item.
* @return {CommandPaletteNavigateAction | CommandPaletteNoneAction} Action result for the UI.
*/
function
getNavigationAction
(
item
)
{
if
(
!
item
?
.
url
)
{
return
{
action
:
'none'
};
}
return
{
action
:
'navigate'
,
payload
:
item
.
url
};
}
module
.
exports
=
{
getNavigationAction
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 19, 06:24 (1 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
e6/01/8b0cc7756d7c0e528ed1539720cc
Default Alt Text
providerActions.js (695 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment