Variables and their transformations
The following variables can be used in the extension actions:
url
– page urltitle
– page titletext
– page textselected
– selected textdt
– current date/time
To go to the variable setting (in the process of creating/editing an action), just double click on it.
Page URL
When using a page address, the following page transformations are available:
unicode
– conversion of unicode characters into readable text (when instead of ahttps://uk.wikipedia.org/wiki/%D0%A3%D0%BA%D1%80%D0%B0%D1%97%D0%BD%D0%B0
we get ahttps://uk.wikipedia.org/wiki/Україна
);clear
– removal of marketing and other service marks;add
– adding to the URL of the page its own parameters, which can be useful, for example, when preparing links for partner programs;bitly
,isgd
– shortening the address with one of the services bit.ly, is.gd.
Examples of how the description of a variable and its transformation looks like:
{{ url }}
– the page address will be used in its original form;{{ url | bitly }}
– before use, the page address will be shortened using the service bit.ly;{{ url | clear | bitly }}
– marketing tags will be removed from the address and then it will be shortened using the service bit.ly.
Page Title
For the title of the page, it is possible to reduce its length to the desired number of characters, specifying a placeholder for the trimmed part (the default is three dots).
Examples:
{{ title }}
– the title of the page will be used in its original form;{{ title | limit:50 }}
– the title will be reduced to 50 characters with a three-dot at the end.
Page Text
Для текста страницы, как и для заглавия, доступна возможность сокращения длины текста до нужного количества символов.
For the text of the page, as for the title, you can reduce the length of the text to the required number of characters.
Selected Text
For a variable {{ selected }}
, you can:
- Specify what will be used if there is no selected text on the page at the time of action (available: page address, page title, full text of the page).
- Delete line breaks in the selected fragment. Useful, for example, when you select a small text fragment on the border of two paragraphs.
- Reduce the length of the selected fragment to the required number of characters.
Examples:
{{ selected }}
– selected fragment or page title, there is nothing selected on the page;{{ selected ?? url }}
– if there is no selection on the page, the page address will be used;{{ selected ?? url | rmbr }}
– line breaks will be removed from the selected fragment (ReMove BReaks)
Current date/time
Examples:
{{ dt }}
– current date and time according to your browser settings;{{ dt:date }}
– date only;{{ dt:time }}
– time only;{{ dt:MM/DD/YYYY (dddd):en-us }}
– date in a given format07/07/2019 (Sunday)
.