File: ns3_links.js

package info (click to toggle)
ns3 3.29%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 126,180 kB
  • sloc: cpp: 490,768; python: 367,771; perl: 8,720; ansic: 7,158; xml: 3,842; makefile: 2,035; sh: 771
file content (58 lines) | stat: -rw-r--r-- 2,093 bytes parent folder | download | duplicates (3)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// nsnam.org links, independent of version
var ns3_site = "http://www.nsnam.org/";
var ns3_home = ns3_site + "";
var ns3_wiki = ns3_site + "wiki";
var ns3_bugs = ns3_site + "bugzilla";

// Links that depend on version:
// Defined in ns3_version.js:

//   ns3_host    = "//"                      file://$PWD
//   ns3_version = "3.14"                    "3.14
//               = "ns-3-dev @ 12345abcde    "repo @ 12345abcde
//   ns3_release = "docs/release/3.14/"      "repo/"
//   ns3_local   = ""                        "build/"
//
// This lets us build several kinds of links:
//    http://www.nsnam.org/docs/manual/html/index.html
//    http://www.nsnam.org/docs/release/3.14/manual/html/index.html
//    file:///.../doc/manual/build/html/index.html
//
// with the appropriate version string.

var ns3_index = "index.html";
var ns3_rel  = ns3_host + ns3_release;
var ns3_api  = ns3_rel  + ns3_doxy          + ns3_index;

// The Sphinx layout template defines
//    var ns3_builder = "html", or "singlehtml"
// so we can condition the links on single/multi-page view.
if (typeof ns3_builder != 'undefined') {
  if (ns3_builder == "singlehtml") {
    ns3_index = ns3_local + "singlehtml/" + ns3_index;
  } else {
    ns3_index = ns3_local + "html/" + ns3_index;
  }
 }
 else {
   ns3_index = ns3_local + "html/" + ns3_index;
 }


var ns3_man  = ns3_rel  + "manual/"         + ns3_index;
var ns3_mod  = ns3_rel  + "models/"         + ns3_index;
var ns3_tut  = ns3_rel  + "tutorial/"       + ns3_index;
var ns3_ptbr = ns3_rel  + "tutorial-pt-br/" + ns3_index;

function ns3_write_links() {
  document.getElementById("ns3_home1").href = ns3_home;
  document.getElementById("ns3_home2").href = ns3_home;
  document.getElementById("ns3_wiki" ).href = ns3_wiki;
  document.getElementById("ns3_bugs" ).href = ns3_bugs;
  
  document.getElementById("ns3_api"  ).href = ns3_api;
  document.getElementById("ns3_man"  ).href = ns3_man;
  document.getElementById("ns3_mod"  ).href = ns3_mod;
  document.getElementById("ns3_tut"  ).href = ns3_tut;
  document.getElementById("ns3_ptbr" ).href = ns3_ptbr;
}