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>'); |
| 18 | |
| 19 | document.write('<script type="text/javascript" src="' + path + 'util/CCNProtocolDTags.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 20 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 21 | document.write('<script type="text/javascript" src="' + path + 'util/CCNTime.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 22 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 23 | document.write('<script type="text/javascript" src="' + path + 'Name.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 24 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 25 | document.write('<script type="text/javascript" src="' + path + 'ContentObject.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 26 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 27 | document.write('<script type="text/javascript" src="' + path + 'encoding/DateFormat.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 28 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 29 | document.write('<script type="text/javascript" src="' + path + 'Interest.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 30 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 31 | document.write('<script type="text/javascript" src="' + path + 'Key.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 32 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 33 | document.write('<script type="text/javascript" src="' + path + 'PublisherID.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 34 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 35 | document.write('<script type="text/javascript" src="' + path + 'PublisherPublicKeyDigest.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 36 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 37 | document.write('<script type="text/javascript" src="' + path + 'FaceInstance.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 38 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 39 | document.write('<script type="text/javascript" src="' + path + 'ForwardingEntry.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 40 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 41 | document.write('<script type="text/javascript" src="' + path + 'Closure.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 42 | |
Jeff Thompson | 768870c | 2012-12-29 21:56:41 -0800 | [diff] [blame] | 43 | document.write('<script type="text/javascript" src="' + path + 'encoding/DynamicUint8Array.js"></script>'); |
| 44 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 45 | document.write('<script type="text/javascript" src="' + path + 'encoding/BinaryXMLEncoder.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 46 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 47 | document.write('<script type="text/javascript" src="' + path + 'encoding/BinaryXMLDecoder.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 48 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 49 | document.write('<script type="text/javascript" src="' + path + 'encoding/BinaryXMLStructureDecoder.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 50 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 51 | document.write('<script type="text/javascript" src="' + path + 'encoding/DataUtils.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 52 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 53 | document.write('<script type="text/javascript" src="' + path + 'encoding/EncodingUtils.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 54 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 55 | document.write('<script type="text/javascript" src="' + path + 'security/KeyManager.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 56 | |
Jeff Thompson | 25cb56f | 2013-01-20 21:20:38 -0800 | [diff] [blame] | 57 | document.write('<script type="text/javascript" src="' + path + 'NDN.js"></script>'); |
| 58 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 59 | document.write('<script type="text/javascript" src="' + path + 'securityLib/jsbn.js"></script>'); |
| 60 | document.write('<script type="text/javascript" src="' + path + 'securityLib/jsbn2.js"></script>'); |
| 61 | document.write('<script type="text/javascript" src="' + path + 'securityLib/rsa.js"></script>'); |
| 62 | document.write('<script type="text/javascript" src="' + path + 'securityLib/rsa2.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 63 | |
Wentao Shang | 0e291c8 | 2012-12-02 23:36:29 -0800 | [diff] [blame] | 64 | //document.write('<script type="text/javascript" src="' + path + 'securityLib/sha1.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 65 | document.write('<script type="text/javascript" src="' + path + 'securityLib/sha256.js"></script>'); |
Wentao Shang | 0e291c8 | 2012-12-02 23:36:29 -0800 | [diff] [blame] | 66 | //document.write('<script type="text/javascript" src="' + path + 'securityLib/sha512.js"></script>'); |
| 67 | //document.write('<script type="text/javascript" src="' + path + 'securityLib/md5.js"></script>'); |
| 68 | //document.write('<script type="text/javascript" src="' + path + 'securityLib/ripemd160.js"></script>'); |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 69 | document.write('<script type="text/javascript" src="' + path + 'securityLib/base64.js"></script>'); |
Jeff Thompson | 336fcb9 | 2012-11-11 19:23:34 -0800 | [diff] [blame] | 70 | |
Wentao Shang | f405a68 | 2012-11-17 13:39:41 -0800 | [diff] [blame] | 71 | document.write('<script type="text/javascript" src="' + path + 'securityLib/rsapem-1.1.js"></script>'); |
| 72 | document.write('<script type="text/javascript" src="' + path + 'securityLib/rsasign-1.2.js"></script>'); |
| 73 | 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] | 74 | document.write('<script type="text/javascript" src="' + path + 'securityLib/x509-1.1.js"></script>'); |