App/UI/Address bar/Shortcuts

From XOWA: the free, open-source, offline wiki application

Shortcuts to wikis in the current language

XOWA has pre-defined shortcuts to different wikis. These allow quick access to an article in another wiki without entering in the full url.

For example, to open the English Wikipedia article on "Earth", you would ordinarily enter:

 en.wikipedia.org/wiki/Earth

Instead, using shortcuts, you can enter:

 w:Earth

Note that shortcuts are case-sensitive. "w:Earth" will work, but "W:Earth" will not.

The following table lists the shortcut for a given wiki type:

shortcut type example shortcut actual url
w Wikipedia w:Earth en.wikipedia.org/wiki/Earth
d Wiktionary d:Earth en.wiktionary.org/wiki/Earth
s Wikisource s:Earth en.wikisource.org/wiki/Earth
v Wikivoyage v:Earth en.wikivoyage.org/wiki/Earth
q Wikiquote q:Earth en.wikiquote.org/wiki/Earth
b Wikibooks b:Earth en.wikibooks.org/wiki/Earth
u Wikiversity u:Earth en.wikiversity.org/wiki/Earth
n Wikinews n:Earth en.wikinews.org/wiki/Earth

Shortcuts to wikis in another language

Wikis in a non-English language can be opened by prefixing the language code to the shortcut.

For example, to go to fr.wikipedia.org/wiki/Terre, you would enter the following:

 fr.w:Terre

Note that fr is the language code for "French" and w is the XOWA type code for "Wikipedia" as defined above.

Search shortcut

In addition, there is a special shortcut designed for search.

 ?:Earth

This is equivalent to:

 Special:Search/Earth?fulltext=yes

The following is a full list of default custom shortcuts

shortcut format 1
c commons.wikimedia.org/wiki/~{0}
sp wikispecies.wikimedia.org/wiki/~{0}
meta meta.wikimedia.org/wiki/~{0}
? Special:Search/~{0}?fulltext=yes
wd www.wikidata.org/wiki/~{0}
wd.q www.wikidata.org/wiki/q~{0}
wd.p www.wikidata.org/wiki/Property:p~{0}

1Note that the ~{0} is used for substitution.

Customizing shortcuts

XOWA also allows customization of shortcuts by modifying the custom gfs file. See: Options: App - Startup

Shortcuts should be chosen wisely. In particular, using "http", "https" and "file" as a shortcut is heavily discouraged. Similarly, "Category", "Talk", "Help", "Template", "Wikipedia" and other wiki namespaces should be avoided.

NOTE: The following script may change in future versions. If your customized shortcut stops working in a future version, please check this page again.

app.gui_mgr.url_macros {
  // note that custom macros take precedence over types. For example, a custom macro of "en.w" will override the type macro of "en.w".
  custom {
    /*
    ~{0}: page
       The page is the rest of the url after the ":". For example, in "c:Earth", "Earth" is the page.
    */
    set('c'    , 'commons.wikimedia.org/wiki/~{0}');
    set('sp'   , 'wikispecies.wikimedia.org/wiki/~{0}');
    set('meta' , 'meta.wikimedia.org/wiki/~{0}');
    set('wd'   , 'www.wikidata.org/wiki/~{0}');
    set('wd.q' , 'www.wikidata.org/wiki/Q~{0}');
    set('wd.p' , 'www.wikidata.org/wiki/Property:P~{0}');
    set('?'    , 'Special:Search/~{0}?fulltext=y');
    // clear;     // clears all macros
    // del('c');  // deletes macro for "c"
  }
  lang_default = 'en';  // sets default language to "en". Entering in "w:French" is the same as "en.w:French"
  types {
    /*
    ~{0}: language code
       The langage code is the part of the url before the first ".". For example, in "en.w:Earth", "en" is the language code.
    
       If a language code is not entered, then the "lang_default" will be used. For example, "w:Earth" has no language code, and "en" will be used.

    ~{1}: page
       The page is the rest of the url after the ":". For example, in "en.w:Earth", "Earth" is the page.
    */
    set('w', '~{0}.wikipedia.org/wiki/~{1}');
    set('d', '~{0}.wiktionary.org/wiki/~{1}');
    set('s', '~{0}.wikisource.org/wiki/~{1}');
    set('v', '~{0}.wikivoyage.org/wiki/~{1}');
    set('q', '~{0}.wikiquote.org/wiki/~{1}');
    set('b', '~{0}.wikibooks.org/wiki/~{1}');
    set('u', '~{0}.wikiversity.org/wiki/~{1}');
    set('n', '~{0}.wikinews.org/wiki/~{1}');
    set('a', '~{0}.wikia.com/wiki/~{1}');
    // clear;     // clears all macros
    // del('a');  // deletes macro for "a"
  }
}

Namespaces

XOWA

Getting started

Android

Help

Blog

Donate