-
-
Notifications
You must be signed in to change notification settings - Fork 9
Plugin
raingart edited this page Mar 22, 2024
·
20 revisions
To understand the basic functionality, check out plugin example
The structure is plain JSON.
A plugin consists of 3 logical parts
- description
- execution function
- list of settings options
It can be divided into two groups: necessary and optional necessary are also divided into two types:
- Required only for launch
- Required for generation on the settings page
- 'id' - unique identifier. Needed to store information about plugin activation/deactivation. The string type,
-
is used as a word separator. - 'run_on_pages' - the name of the url (
location.pathname
) on which the plugin will be launched. Specified with a comma. - '_runtime' - The function that will be called when the plugin starts. Essentially the "code to be executed" of the plugin. The function takes one single argument
user_settings
- a list of all user settings in JSON/Object format (key:value).
Options to launch include:
- restart_on_location_change - Indicates that the
_runtime
function should be restarted every time the url (location.pathname
) changes. Provided that the new url matches those specified inrun_on_pages
- 'title' - plugin name (on one line)
- 'section' - logical group in which the plugin will be displayed
- 'desc' - tooltip when hovering over plugin (html
title
tag) - 'options' - JSON subgroup with a list of options
For example, let's analyze such an object
'option_name_to_save': {
_tagName: 'input',
label: 'Smooth',
type: 'checkbox',
title: 'Help info',
'data-dependent': { 'another_option_name': true },
},
- 'option_name_to_save' - the name that the specific option will be stored. Word separator is underscore
_
- '_tagName' - html form tag name. Available: 'input', 'select'
- 'label' - the visual name of the option that will be inserted into the 'label' tag next to the element specified in '_tagName'.
- 'type' - an important parameter indicating the type of hero specified in '_tagName'
In fact, all other additional value keys point to
attributes html : value
The unusual ones are 'data-dependent': { 'another_option_name': true },
- used to show when activated or specific knowledge it depends on
An up-to-date complete list can be found in /plugins/nova-api.js
For the extension, add the path to the array in the file /js/plugins.js
For Userscript add the plugin after this window.nova_plugins = [];
- Ad intro skip
- Player hotkeys always active
- Pauses playing videos in other tabs
- Pin player while scrolling
- Video quality
- Playback speed control
- Replace default indicator (bezel)
- Video autopause
- Stop video preload
- Custom player buttons
- Hide some player buttons/elements
- Theater Mode
- Subtitles (captions) style
- Time jump
- Volume control
- Control below the player
- Force show control panel in embed
- Hides the player control panel
- Float player progress bar
- Player progress bar color
- Remaining Time
- Show duration on live
- Try unblock if video not available in your country
- Skip warn about inappropriate or offensive content
- Resume playback time state
- Show time in tab title
- Player force resize 16:9
- Hide End-Screen info cards
- Disable miniplayer
- The default tab on the channel page
- Clear links from redirects
- Block thumbnails by title
- Blocked channels
- Disable page sleep
- Normalize title
- Clear thumbnails
- Thumbnails filtering
- Clear thumbnails
- Mark watched
- Add "Play All" button
- Scroll to top button
- Disable shorts
- Add RSS feed link
- Hide scrollbar in watch page
- Blocked channels
- Block thumbnails by title
- Thumbnails filter
- Decapitalize thumbnails title
- Mark watched thumbnails
- Thumbnails preview image
- Add "Watch Later" button on thumbnails
- Add "Not Interested" button on thumbnails
- Show titles original language
- Description section in popup
- Title hashtag
- Show channel videos count
- Date format display
- Show Ads info
- Hide metadata
- Clear links from redirect
- Disable scroll to top on click timestamps
- Expands video description
- Buttons hide-visibility
- Auto-like
- Show dislike count
- Show transcript
- Add sort/filter to "Save to playlist" menu
- Collapse related section
- Collapse livechat
- "Live chat" mode instead of "Top chat"
- Move to sidebar
- Fix channel links in sidebar