summaryrefslogtreecommitdiff
path: root/Build/source/libs/pplib/pplib-src/doc/_build/html/_static/bizstyle.js
blob: 6614fe388d18e78aeec775d823b63b250ad75c16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// bizstyle.js
// ~~~~~~~~~~~
//
// Sphinx javascript -- for bizstyle theme.
//
// This theme was created by referring to 'sphinxdoc'
//
// :copyright: Copyright 2012-2014 by Sphinx team, see AUTHORS.
// :license: BSD, see LICENSE for details.
//
$(document).ready(function(){
    if (navigator.userAgent.indexOf('iPhone') > 0 ||
        navigator.userAgent.indexOf('Android') > 0) {
        $("li.nav-item-0 a").text("Top");
    }

    $("div.related:first ul li:not(.right) a").slice(1).each(function(i, item){
        if (item.text.length > 20) {
            var tmpstr = item.text
            $(item).attr("title", tmpstr);
            $(item).text(tmpstr.substr(0, 17) + "...");
        }
    });
    $("div.related:last ul li:not(.right) a").slice(1).each(function(i, item){
        if (item.text.length > 20) {
            var tmpstr = item.text
            $(item).attr("title", tmpstr);
            $(item).text(tmpstr.substr(0, 17) + "...");
        }
    });
});

$(window).resize(function(){
    if ($(window).width() <= 776) {
        $("li.nav-item-0 a").text("Top");
    }
    else {
        $("li.nav-item-0 a").text("pplib 0.1 documentation");
    }
});