-
<static> allow_rtl :boolean
-
Whether to allow right-to-left layout.
Type:
- Source:
-
<static> allowLabelOauthEdit :boolean
-
Whether to offer, in a hoverbox, the setting a missing item label via OAuth (WiDaR). Waiting for Wikidata API bugfix.
Type:
- Source:
-
<static> banner_width :number
-
Width of top banner from WikiVoyage, in pixel.
Type:
- Source:
-
<static> force_wdq :boolean
-
Make sure WikiDataQuery is available; force http over https, as wdq VM does not do https.
Type:
- Source:
-
<static> internalCalendarBrowsing :boolean
-
Use in-page reload of dates - quicker, but does not update the URL.
Type:
- Source:
-
<static> mark_missing_labels :boolean
-
Whether to mark labels missing in the current language (red dotted underline).
Type:
- Source:
-
-
Maximum number of thumbnails in the "related media" section.
Type:
- Source:
-
<static> showConceptCloudLink :boolean
-
Whether to show a link to the concept cloud tool in the sidebar.
Type:
- Source:
-
<static> showQRLink :boolean
-
Whether or not to show a QR code in the sidebar.
Type:
- Source:
-
<static> showSearchImages :boolean
-
Show images in the search results.
Type:
- Source:
-
<static> use_autodesc :boolean
-
Whether to use autodesc for automatic item descriptions.
Type:
- Source:
-
<static> use_hoverbox :boolean
-
Whether to show infoboxes when hovering over an item link.
Type:
- Source:
-
<static> use_js_refresh :boolean
-
Use in-page reload of pages - quicker, but updates the URL in an ugly fashion. Not bug-free.
Type:
- Source:
-
<static> use_wdq :boolean
-
Use WikiDataQuery, unless page is "live".
Type:
- Source:
-
<static> wdq_url :string
-
WikiDataQuery URL.
Type:
- Source:
-
<static> widar_url :string
-
WiDaR API URL.
Type:
- Source:
-
<static> addClaimItemOauth(q, prop, target)
-
Adds a claim [q:prop=>target] to an item using WiDaR/OAuth. Reloads the page if successful, or shows error message.
Parameters:
Name |
Type |
Description |
q |
string
|
: The item to modify (usually reasonator.q). |
prop |
string
|
p : The property for the claim to be added. |
target |
string
|
: The target item ID. |
- Source:
-
<static> checkWikipediaImages()
-
Checks is the main item has an image; if not, checks Wikipedias for image candidates; shows link that opens dialog, adds images via WiDaR/OAuth.
- Source:
-
<static> clear()
-
Reset all data. Used in init and for in-page reloading. Incomplete.
- Source:
-
<static> findLongestPath(o) → {array}
-
In a graph of items linked by properties, finds the longest path from a give item to a root item.
Parameters:
Name |
Type |
Description |
o |
hash
|
Hash with keys "start" (start item ID) and "props" (array of property IDs). |
- Source:
Returns:
List of item IDs, starting with the "o.start" item, ending with the root item.
-
Type
-
array
-
<static> generateTimelineData()
-
Tries to generate timeline data. If enough data was generated, shows timeline via showTimeline.
- Source:
-
<static> getCurrentUrl(o) → {string}
-
Returns the current URL, with modifications is set.
Parameters:
Name |
Type |
Description |
o |
hash
|
Can have keys "hash" (bool: use hash or "?" to separate parameters), "lang" (string: language), "live" (bool: use API instead of WDQ) |
- Source:
Returns:
URL.
-
Type
-
string
-
<static> getUrlVars() → {hash}
-
Get URL parameters. Prefers hash "#" parameters over GET "?" ones, for using in-page loading.
- Source:
Returns:
URL parameters.
-
Type
-
hash
-
<static> getWDQnotice()
-
Returns a HTML text with a note that the above section uses WDQ as a data source, and a link to the "live" version of this page.
- Source:
-
<static> init(callback)
-
Initializes the object, loads the root object and interface texts, then runs callback.
Parameters:
Name |
Type |
Description |
callback |
function
|
Callback function. |
- Source:
-
<static> renderSubclassChain(q)
-
Follows "subclass of" property to the source, and shows that list.
Parameters:
Name |
Type |
Description |
q |
string
|
The item to start with (usually reasonator.q) |
- Source:
-
<static> showTimeline()
-
Shows a timeline generated by generateTimelineData.
- Source:
-
<static> t(k) → {string}
-
Get interface text in the current language. Fallback to English.
Parameters:
Name |
Type |
Description |
k |
string
|
The key for the translated string. |
- Source:
Returns:
Interface text in current language.
-
Type
-
string