Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 1 | // Including js files to be used in the web pages |
| 2 | // Add your js source code reference here, rather than in the HTML files |
| 3 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 4 | // Find path to Helper.js |
| 5 | var scripts = document.getElementsByTagName('SCRIPT'); |
| 6 | var path = ''; |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 7 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 8 | if(scripts && scripts.length>0) { |
| 9 | for(var i in scripts) { |
| 10 | if(scripts[i].src && scripts[i].src.match(/Helper\.js$/)) { |
| 11 | path = scripts[i].src.replace(/(.*)Helper\.js$/, '$1'); |
| 12 | } |
| 13 | } |
| 14 | } |
| 15 | console.log(path); |
Jeff Thompson | 5b265a7 | 2012-11-12 01:13:08 -0800 | [diff] [blame] | 16 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 17 | document.write('<script type="text/javascript" src="' + path + 'WebSocketTransport.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 18 | document.write('<script type="text/javascript" src="' + path + 'util/CCNProtocolDTags.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 19 | document.write('<script type="text/javascript" src="' + path + 'util/CCNTime.js"></script>'); |
Jeff Thompson | 65a11e4 | 2013-02-18 17:47:59 -0800 | [diff] [blame] | 20 | document.write('<script type="text/javascript" src="' + path + 'util/ExponentialReExpressClosure.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 21 | document.write('<script type="text/javascript" src="' + path + 'Name.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 22 | document.write('<script type="text/javascript" src="' + path + 'ContentObject.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 23 | document.write('<script type="text/javascript" src="' + path + 'encoding/DateFormat.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 24 | document.write('<script type="text/javascript" src="' + path + 'Interest.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 25 | document.write('<script type="text/javascript" src="' + path + 'Key.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 26 | document.write('<script type="text/javascript" src="' + path + 'PublisherID.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 27 | document.write('<script type="text/javascript" src="' + path + 'PublisherPublicKeyDigest.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 28 | document.write('<script type="text/javascript" src="' + path + 'FaceInstance.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 29 | document.write('<script type="text/javascript" src="' + path + 'ForwardingEntry.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 30 | document.write('<script type="text/javascript" src="' + path + 'Closure.js"></script>'); |
Jeff Thompson | 768870c | 2012-12-29 21:56:41 -0800 | [diff] [blame] | 31 | document.write('<script type="text/javascript" src="' + path + 'encoding/DynamicUint8Array.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 32 | document.write('<script type="text/javascript" src="' + path + 'encoding/BinaryXMLEncoder.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 33 | document.write('<script type="text/javascript" src="' + path + 'encoding/BinaryXMLDecoder.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 34 | document.write('<script type="text/javascript" src="' + path + 'encoding/BinaryXMLStructureDecoder.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 35 | document.write('<script type="text/javascript" src="' + path + 'encoding/DataUtils.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 36 | document.write('<script type="text/javascript" src="' + path + 'encoding/EncodingUtils.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 37 | document.write('<script type="text/javascript" src="' + path + 'security/KeyManager.js"></script>'); |
Jeff Thompson | 25cb56f | 2013-01-20 21:20:38 -0800 | [diff] [blame] | 38 | document.write('<script type="text/javascript" src="' + path + 'NDN.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 39 | document.write('<script type="text/javascript" src="' + path + 'securityLib/jsbn.js"></script>'); |
| 40 | document.write('<script type="text/javascript" src="' + path + 'securityLib/jsbn2.js"></script>'); |
| 41 | document.write('<script type="text/javascript" src="' + path + 'securityLib/rsa.js"></script>'); |
| 42 | document.write('<script type="text/javascript" src="' + path + 'securityLib/rsa2.js"></script>'); |
Wentao Shang | 0e291c8 | 2012-12-02 23:36:29 -0800 | [diff] [blame] | 43 | //document.write('<script type="text/javascript" src="' + path + 'securityLib/sha1.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 44 | document.write('<script type="text/javascript" src="' + path + 'securityLib/sha256.js"></script>'); |
Wentao Shang | 0e291c8 | 2012-12-02 23:36:29 -0800 | [diff] [blame] | 45 | //document.write('<script type="text/javascript" src="' + path + 'securityLib/sha512.js"></script>'); |
| 46 | //document.write('<script type="text/javascript" src="' + path + 'securityLib/md5.js"></script>'); |
| 47 | //document.write('<script type="text/javascript" src="' + path + 'securityLib/ripemd160.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 48 | document.write('<script type="text/javascript" src="' + path + 'securityLib/base64.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 49 | document.write('<script type="text/javascript" src="' + path + 'securityLib/rsapem-1.1.js"></script>'); |
| 50 | document.write('<script type="text/javascript" src="' + path + 'securityLib/rsasign-1.2.js"></script>'); |
| 51 | document.write('<script type="text/javascript" src="' + path + 'securityLib/asn1hex-1.1.js"></script>'); |
Jeff Thompson | 1e4c183 | 2012-12-29 17:05:57 -0800 | [diff] [blame] | 52 | document.write('<script type="text/javascript" src="' + path + 'securityLib/x509-1.1.js"></script>'); |