Add code for templating html files

This commit is contained in:
Caleb James DeLisle 2018-06-12 16:50:38 +02:00
parent b444e17b71
commit b9672e342d
65 changed files with 335 additions and 258 deletions

View File

@ -47,7 +47,8 @@
"html2canvas": "^0.4.1",
"croppie": "^2.5.0",
"sortablejs": "#^1.6.0",
"saferphore": "^0.0.1"
"saferphore": "^0.0.1",
"requirejs-plugins": "^1.0.3"
},
"resolutions": {
"bootstrap": "^v4.0.0"

View File

@ -64,6 +64,8 @@ module.exports = {
// for accounts.cryptpad.fr authentication and pad2 cross-domain iframe sandbox
"frame-ancestors *",
'require-sri-for script'
].join('; '),
// CKEditor requires significantly more lax content security policy in order to function.

View File

@ -1,6 +1,6 @@
define([
'jquery',
'/api/config',
'/common/config.js',
'/common/hyperscript.js',
'/common/outer/local-store.js',
'/customize/messages.js',

View File

@ -14,7 +14,7 @@ defineManifest({
"main.js": "drf9gISEfT0ipwZxW0+SfMqlF12OoIWucURHVlFRbHk="
},
"bounce": {
"main.js": "Q6XwDGtdoUnAZ8C/kNwTzaCVC7+zS7w2BLsQj2Jg0sA="
"main.js": "+bwujEB1B6AQvtZlMfFRf3aH7+3snQN64pk8YiWzpJ0="
},
"bower_components": {
"alertifyjs": {
@ -3737,6 +3737,29 @@ defineManifest({
"requirejs": {
"require.js": "uvn41VNPQ8aVNA6aS1Zjc2FUPkKq7ZgA6SzFiHkVgxs="
},
"requirejs-plugins": {
"examples": {
"img": {
"relativePath.js": "SyumWGLb9xxCxSmgqUjYf/exAgibR9xISNe52fqvJB8="
}
},
"lib": {
"Markdown.Converter.js": "lQr1zRtxA8YA96Kr4Ao1LLej0QYUgAR9KG8acTp6uow=",
"require.js": "5+BuX+6beEum0Vnuh7uiodVENZ2b4IsV8UAqDsgPjPo=",
"text.js": "FkW1ku4cUpwohsxvAw6OgsCbRtyj80vgRBxUyoj8Kog="
},
"src": {
"async.js": "8KUzKYUnIAgxvmHzZs3Ly6Q5yoJKAujlOgiYKPGLGPA=",
"depend.js": "SNaJoVFD+7c0rrQD/ZecIP9ZzbMqtXfPQdIJxGhp6tY=",
"font.js": "zMXVtq3bFswMDDs1McEL3Cg7u2wcjPw1PJgdI2EK4os=",
"goog.js": "41ddyqRlfxUtMMaPnfPHfJ8dR1Y1wbsRYiehgt0oNTI=",
"image.js": "YnDQ4vSySzmQMUrkg67JRJeQdBGBVo0KVHTiC12HxsY=",
"json.js": "uZbJR9xdaaaO3PzQPep6FbLo+2Lu8yOP5rxQXRKmrQE=",
"mdown.js": "d28k3+yXW2yv/aLz2OerViPYVfS+f6ftAUG+AzLn0z4=",
"noext.js": "nuPbMbkovfEZG4siRQIVC4sCr/kPYsJdDuRw8rhS2DE=",
"propertyParser.js": "mn77u8+jOwS7OmZ3L8xyTNhR6uLMh5YrZ4NoZTKFL48="
}
},
"saferphore": {
"index.js": "C6SvlP6jhoSX13W5OfLikQNMwK5VMQ4Wb94dXpENwH0=",
"test.js": "yLQRPPygQnCRS5cmLtyEk6fsHCiQ9rSrtpubtj0rqq8="
@ -3773,12 +3796,13 @@ defineManifest({
"orgmode.js": "NQNUlnlLWjHIuXOdJxX75xvwmIOJ3rZaJQN1ygbgy10="
},
"common": {
"LessLoader.js": "4gw7t9RGCm/rsUSCyaMHjmFzV6vGWn2dy+JUL5LFT3I=",
"LessLoader.js": "3uLn1sW/vcIVYQ2/OKq0A41ZN7Pj5+n950UGbWFcmgc=",
"RequireJson.js": "4JEgQi89DWSucX+zC4NptJ0urEJRWD14arrcsnFndpM=",
"RequireLess.js": "saShGzxCjk/sH6B+3yNun6YyT2Cne8Wj8dBz9oUNv8U=",
"TypingTests.js": "9OmAY0XeB2av1M7mNZ6YyK1TNk2OZmJREYp4UjJ03aU=",
"application_config_internal.js": "977lvWLw22OgcpJYGgixlgj64eN917koSw8P/ZtkE48=",
"boot.js": "UglPyWFblBM7bFInkIwFBdOif9qGAmGsH5u/Me76864=",
"boot2.js": "sY+z7zcxIflpEJuhWhRQ6AFKdaZ9NkXYExK61HNZCOM=",
"boot2.js": "1qK/3CMyAbrsPZd9KFDIjYbRwoVrmxYGnHCLohBbCqU=",
"clipboard.js": "+V7yoDu3EbsPnV2Xk6hPemvatqJTowbBLYJM7IkVvCc=",
"common-constants.js": "V8TxZLCr5GVqeJM6h1G7yfMho4pXjdBAChMQuELH+M8=",
"common-feedback.js": "UjeghAfJdmGLzXLxav0Ctnw4MhlMXv8QJcGgitB6IV8=",
@ -3790,11 +3814,11 @@ defineManifest({
"common-notifier.js": "z0faHkLifuAnK4T+Y22bCpejRlT5ZFHj46wIkMJW+2E=",
"common-realtime.js": "wmiseagZ/nBrUKjZFUf1Q089OfM6qLWykd5l7drNQjg=",
"common-thumbnail.js": "Ol2y1ht3ufb/T2qKZpml++5ImFA4Y+LHKq6ZET559mg=",
"common-ui-elements.js": "U8GQJA+kVAFVtlaso/W7rOdBC9cKthNHtKrRlTBZt3c=",
"common-ui-elements.js": "eNyOnOr/1fuAyIQQkegh6KcvU+Ug0LnCwfc+oKbe5T4=",
"common-util.js": "ySc4Ux5txkoWJTJjRidO0KBFUeeHMOOzr5RsvXV80V4=",
"config.js": "ACBMX1O0S0R8Rs+TdtRER8fkMgH8rhC2DciXb5cf/XQ=",
"config.js": "ZTcianWJokv3mmS4tmR1hLLfzC1w/UaR3t+PP9SJuuA=",
"cryptget.js": "HW7cbLkKpJDB6m7brq1Kwey1VNGYC+GdyoQizJFP7LI=",
"cryptpad-common.js": "T7AXSBbmAUc4F/On52h/FeH5Ycoj+xWn0ogZA0Csy+w=",
"cryptpad-common.js": "uQ1h9EDzKmRnwfGZEDh9Ck99oq5aNDcpnQ/XEZ4PdbU=",
"cursor.js": "GCuUBs0HZe+sxbEI0QSwOKQq8Q/oo0yqgwH7uWsLlwc=",
"curve-put.js": "44yvCIuttJSPC41uPhk93AKchlO8BOcgYk3OoWI2YN0=",
"curve.js": "vPtg2DFJuPz6NuzAsaR9Xm0dzVPNnrgLs5hIqnlM9NA=",
@ -3815,12 +3839,12 @@ defineManifest({
"migrate-user-object.js": "YulKoaKqHjpbF8VwsEqikPCeoC7EUVdm+hC6HBQ145c=",
"modes.js": "9ZjUQRwZbpH5kZ/xPhKPdOVHwNF3gb+BxVH3p7M++VM=",
"noscriptfix.js": "X/ZB5PEoNd3FlWNKDvHBYPh4aWohNiUIFh+r6Q2kUNI=",
"notify.js": "ideyQ+P+ilfMCAOYsvqrRKLksa3d1t9q3xQgpKV/raA=",
"notify.js": "uwyd028CSrscnd8Yozcuiu5Jc+ruDLiMUiXWXSl76S0=",
"outer": {
"async-store.js": "JNkAcmZrcjXQPKr5op2RcQBwn7tkrm5ttbmwVeskp9I=",
"chainpad-netflux-worker.js": "aRIO3xCs6s4PG7DCqwLOT/6lPuJ/XdOBqxMzH2QhcNY=",
"local-store.js": "SFE30lGABz7af3Sx8kI5RDoK2SModEQaQKQ0upFI48o=",
"network-config.js": "rhi5XW8phtyfbk8ax+eKgAz6/Alvjgt+O/AomdO/wJs=",
"network-config.js": "SQJ9yiL5AJqNKqpxV4/051Q1L+i9UHG5UEDBstFy7/4=",
"store-rpc.js": "NgnzRhJxDjH7bfwyU7xm9GHoBBWH9F6mlYhgv07DEWI=",
"upload.js": "deDriogptZadbKab6o57VJrUiQH6aY8h8zDvDmsj0CU=",
"userObject.js": "xqqnElhqfG9DgJM6nElsABEoB1UHRAw2M29bNTQuENw="
@ -3850,32 +3874,32 @@ defineManifest({
}
},
"pinpad.js": "ya+HXcfu+lJLLhIEHX5FornKnhZd5GH8fcN3bwrzoWE=",
"requireconfig.js": "wCPWJHcRA4AF/NGR8eRM1HP34J8HyikBCPUcBRTIkFc=",
"requireconfig.js": "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=",
"rpc.js": "xtLYr1rfErQrt2o0UoatAlsI4Uy8/cLNsRMuWBHjbYk=",
"sboot.js": "zKt3KH6sKFs2vzvo0lYJHVJZDzRz6pljOoVY4hJsiRI=",
"sboot.js": "8IaxCUqjpzoP7AEPEk++VQ+Bk83mRdXx4dK+XvSNPcI=",
"sframe-app-framework.js": "Niit3/AL31DhzJZszOFolsbdBiTzOOjL9+ai+pCxewo=",
"sframe-app-outer.js": "gwZR1f9jmdI0Our8fotAVXd4pKKC/2U27eOmVK9IQOw=",
"sframe-app-outer.js": "N2PEM7S5J+SMh0lLZb8SCb/cBtaPXSdrB/DO7akQGP0=",
"sframe-boot.js": "3ogfkzUbhkNkxpwDfYYXS5KuwRuRnSE7idzqSSU395A=",
"sframe-boot2.js": "wrygcFz2V7C0+/mvTjB9v8AFg4xtzTB+NiorbCQBjCk=",
"sframe-boot2.js": "0LXCIDoEm87cTBRkbd6K/P8mrTmuMsDooAFhUHDyMJQ=",
"sframe-chainpad-netflux-inner.js": "JjEcg0eInFptgb7b23brLq6riTdrjvs6o+Doi1hH9fg=",
"sframe-chainpad-netflux-outer.js": "IWYVJk8qQHM0HrC3nYs+pKswgNVVuwMNNXvKaZSdWmg=",
"sframe-channel.js": "jKAu7FcK/EyZy+S5jb8DC1T3gTMEo0pMqtlFZvTimaQ=",
"sframe-common-codemirror.js": "6C99Rp/v0IUFJikz0yBGCPRvqJUOrGOjdl7ZcdKS76w=",
"sframe-common-file.js": "8ulN86yelfmbrHgVGYBAqJfLNRPFN488V1BQE0SacDc=",
"sframe-common-history.js": "SJZTsJTR+prwgschIT+Pjqi32yn+/OUzdhE2ksi9mms=",
"sframe-common-outer.js": "JoRJNgCjDScvby4nVIj2N/2Lt5DfhBdiJoilg+ZpMNw=",
"sframe-common-outer.js": "pp5aVW/ObIaVgo4ayyL2lK4X++fbDn0izCHOiR4iItk=",
"sframe-common-title.js": "1coNcbAbCVrZ+RLIMZ0MMzzcEbVzx4XcnZJmhuQxwYI=",
"sframe-common.js": "ziULrim1w7Kc9GKWTKRsCSpZqSXQ59ySEb8NLsNUmMU=",
"sframe-messenger-inner.js": "sSTXnVcoWGP6hBcr7AJuZKNKITmFcM0gCatxE9dNens=",
"sframe-protocol.js": "iFMprfMy15JinzSRJUjpqm3CvSG+2cC9ir3ilYNmDIE=",
"sframe-sboot.js": "UlBPtJixJa5hY7c/kEpBhVA71G/yAeFDgkTwLwv/KsE=",
"sframe-sboot.js": "nxZScs/9Qu/cRsrGjX4ssS64Zmrw8qsJp2iJBSJDkhQ=",
"test.js": "d4hw/7nv2CWZf6w2x0IKa0D7yrVOSXHhuJ+mQ0fsJ7Y=",
"text-cursor.js": "2cuibOkrE7s6u2A5hMfzrjXTJXgcnckEQ3S20i+KnS4=",
"themes.js": "PQJN9gLLOs65QXgxjwKpKDARsXLE6v0W0rHVocH+OCw=",
"tippy": {
"tippy.min.js": "OMV+lCXCmrLhNTmmyuO9FUzBlEXAALQpmIa6EQLOY3Y="
},
"toolbar3.js": "3HNRONcf0ZfEUE6juZ7kInQJvmN+Wx72HOqU53BehcY=",
"toolbar3.js": "al6swIDoA39hDyFd4KH/9+abJ1+/ScZPWeKQKoaztnE=",
"treesome.js": "x57Ug7H7FD2CDFE5BYB9YcFdID3Q+4wFH8xWpaqB/Dc=",
"userObject.js": "eezGdJmIHzKMxR5bo1olImnq5nU8+p7N2t1S+U81nr8=",
"visible.js": "4l/0CA1YKcVmA3Xg7Pa8ULTjdepUGzoGQjlRN0q1PY8=",
@ -3883,7 +3907,7 @@ defineManifest({
},
"contacts": {
"inner.js": "T38ySYCpNUDTkWyvpaVrJg92yAr+XoWr+56QA3MdTng=",
"main.js": "yAsq12f/yAqf0/3jr4okDhRZHjejqTJ9qlzF0vsGchs=",
"main.js": "LPo/t2n3Cu28e+KP4E1eTOUyr7gIBMK02Kv67r/fYlc=",
"messenger-ui.js": "1POCVi3RUkSx7uONlivkN3cqZXWoif0dSu9phUKhkmY="
},
"customize": {
@ -3891,13 +3915,13 @@ defineManifest({
"ckeditor-config.js": "Ypowv6YW2pjfsWPCaZf3XuxiFUUbv1b61hD+yjgaq5Y=",
"credential.js": "E/xwRxY1m5DBRHoq6TzracJ4H7sue2rBq1clBgvukYg=",
"delta-words.js": "PyVJqoZ6G1qSurMf4dSmKBFx0t/rII+pTzedXl6FCbA=",
"four-oh-four.js": "qPc8/IrfDDpP7NG16TAXT3nOWcBl606ZZ4oZGUWyGSI=",
"four-oh-four.js": "cKUiIvXzFucEXKChFn9pkhF6yp8fMmKdpTO5j6vIUnc=",
"loading.js": "wvxuuHKdw7AvU+q1Kt4WDJCZ2N3LHvyGB0LCXilmOKY=",
"login.js": "oHI88PerEhnqbaWUdodkapeN89wunfU80zw0F1NfezI=",
"main.js": "aLprowHBsWNDyKs4UKM6H23h3GHjLCMjNTIPJY28zyg=",
"manifest.js": "MprKJ2jlbKG2AcGCLYOzfwMyEoYMCYjQGwOam1ahNMQ=",
"manifest.js": "B7l1emEVp9TwNDSDNfJftGXPTeOSZLpHUHINvaSGYg0=",
"messages.js": "LD+fuDq/d+3MOcPoE/jQGW2yveHvZdlU6Z7u5ecnr58=",
"pages.js": "nVxihrFxZND37sskQwv91MIA4daozrZrC9lyae2DlFU=",
"pages.js": "ZfXlM+r8Gwfb2PLHFNhYBSLiiqUHLhLllXuu3+e0KOI=",
"template.js": "Utai2Frdot+RcEMOXwHNO2KCJL/zCw/6QwZKZ7LSLrs=",
"translations": {
"messages.de.js": "9+NygTQeCor1w3a8tiwshsrFvh3KpZ8yE+jgt4SNwwQ=",
@ -3913,17 +3937,17 @@ defineManifest({
},
"debug": {
"colors.js": "W9EQ2XH4UkJYY5WMh5zURPgyaPCbemBtzSREziMbU28=",
"inner.js": "H4eLFA27MRKWprB5TJMJdY6tT0xQ4vbZmZCbeIr3MO0=",
"main.js": "bSs5e/SRIp4IBFEVXaVUgdQ9XK9n+kTjN7sGe9AVmko="
"inner.js": "61r3mJToUFBLOTT74WeBsit4MJv2FDyw/AuqJMU1lFE=",
"main.js": "hp6sIZmmYe2dEI3zimSSO6xbfEmlQpX1HlVjj97e+ck="
},
"drive": {
"inner.js": "Awi882kSSlwnEM5To2XTo7wRpk8AyV6JmmKjrF1kvIY=",
"main.js": "LtNaG7OlNLdTivfUPKhzcs5eao6MIJEjEz8vzPC5hKk=",
"main.js": "CZokj5AjtlecgW4Ogh5I+viChCjscIGPHmsQmsUL/f8=",
"tests.js": "vKSqjsJS8e93XpXb/4PeaA5ROkOvrZUrXY7g+OwvU2o="
},
"examples": {
"json": {
"main.js": "cCE4Noc0t/2kd61X/XzybjUvIxYYw79JTMY2Hgl9mGI="
"main.js": "w4jesWHuKTQRcC5VGbGI2UWwkaiThF6KAP6sSkAziwE="
},
"pin": {
"main.js": "y2WlF9Ic3SNctKzMfhXeiTUpsJRZYluBiHm+fKytMNA="
@ -3932,17 +3956,17 @@ defineManifest({
"main.js": "5BIIJJq9MQSOEDvsEm3u++tB1da9XvNHAqIgACYmfzo="
},
"render": {
"main.js": "MBrXoY3OG0Q1Z9hta7CSPkCzFCXmMIxSap80YcaZ+ME="
"main.js": "OOHVr8PIUlWFMJ+8nCzZMmRwpg6udm2GUk6LQmEp/CU="
}
},
"file": {
"file-crypto.js": "xyLbJh5jDuqnOTMD8SsZrTsKhfj+U2rmHTBHeA3WlaA=",
"inner.js": "xmF809fuQA6RUhD/U/ucKfXFyYm5mI1zRv1/9OZWMb0=",
"main.js": "M+286VTcTcGbPmHHiK/Voe/tTGnCAkr6PP2u6AD/NUE="
"main.js": "RmM0zgrtXl407Pp1yywoaqrZC8Wxn0CJ+Un8MM1bt9I="
},
"filepicker": {
"inner.js": "DbkMOed+bJlkyDwvcYE/kROM4omrT/wKdWv5er7Xfh0=",
"main.js": "wE05p3lxpupnHG5fzQoqPhdKq4yfNa49gsYEGxpcQpg="
"main.js": "DXQC3pO8Z8m2Q00G1HHsAb5JDNuDTcyMQsZSodeAMuk="
},
"invite": {
"main.js": "yNLo3EO1HV0GlMKJJaeb0UWi+tjWVPfdNqJIuwO7j3w="
@ -3962,27 +3986,27 @@ defineManifest({
"media-tag.js": "+rntZvt6AC4tfTxYRS4cKUriOxAdPDjGhToPMK2rN70="
},
"pad": {
"inner.js": "fmuo9ty199cM+xAQkcVA7gQpDpAn6tgyAPXuI3EPN4Y=",
"inner.js": "3RPVrpcNZuw3Q6fYcQhMKOpVQ8Mkfxr2yL6tn3j8hcQ=",
"links.js": "PeMbF9vRBf6g/3CMTyj7gjCMao2yooXzVj0m2gTzndo=",
"mediatag-plugin-dialog.js": "MmLsOmMiafbcLkgobaqV1sEBGhNPQvLya6RvYdE9zC4=",
"mediatag-plugin.js": "XcIepE2pWsB4HQwthADcXKpiamHrXsaycGZn1P4g3uc=",
"wysiwygarea-plugin.js": "AtP6xHVHoBZpa1sI/6jR4e8PVDH15+j4ht0dKcvxYus="
"wysiwygarea-plugin.js": "nleYxCY8CtVXV0mQo4UuJPJeEwipVAwlAwzRNAkY9jY="
},
"poll": {
"inner.js": "hnPTIvpkA3O1P+UGiSIewzTiule/4keM/ubYZT9ypnw=",
"main.js": "qspnT4VgIYHoTTlFbRvuoJibwfn7JdNIPPS60G0yxMI=",
"main.js": "FOr+VHy1pN5L4LsoJB2JRpfb7x+JIiJ3S6ioCmDn8X0=",
"render.js": "4mOIkRQRH8gT2tN3cqKsWyiyEyEPejLPtNvKVJuX2hY="
},
"profile": {
"inner.js": "Wr3fVDk2a/Ztw4tM6IEbLAGJ33xddDAHmSLaZ3XcCYw=",
"main.js": "X42NqY6eipBH3puJgEkcDqK+ddDEV83pkQ20VVPIvXg="
"main.js": "oFJmRGvOsVuibB+gSUWFhoJu/ALudhXnTFN9knZq+U8="
},
"register": {
"main.js": "TkDhRIu07w93V6U1yWEjVYlYyMaNNcI6j4hu+QoyL6M="
},
"settings": {
"inner.js": "o+10fwJPqa/XojRH6Qfm/p+g+RaTby5WS/RTOH+jntc=",
"main.js": "4T+in3lYWm/HMwAFJD/7Ls8K3GKVoO40wbRAioUmwCk="
"inner.js": "vUKhdz28oVxJQpBtVANMEvT1IirrJ+ZKo6yLvGXNzbg=",
"main.js": "Kl8rTPbM7eEKgadz4EZLzxV3k/zUpAeYPjwyaiA1JmI="
},
"slide": {
"inner.js": "kotgVcmkTr+DfOVHGpuh5J4Zq1HWTYwyPT+KNANJaL0=",
@ -3990,7 +4014,7 @@ defineManifest({
},
"todo": {
"inner.js": "XW3EmsOZHGL9w2xIPF7iZBHvRI3IYdLHnQeD6NZiuS4=",
"main.js": "zZN1Xj7SVrS24LDj+uQm1/DyMhxNpktLd43c2DoOzvk=",
"main.js": "RhR0BzD3MGSe5nUqRMFenRCGAlYG1o7Bz34gleJ1fV4=",
"todo.js": "TQO9Z1QENMYE6qcX1cx2xHXqFit8GhFJ+UwwKllCGvY="
},
"user": {
@ -3998,12 +4022,12 @@ defineManifest({
},
"whiteboard": {
"colors.js": "W9EQ2XH4UkJYY5WMh5zURPgyaPCbemBtzSREziMbU28=",
"inner.js": "G1qoYafEYQp/LZT0SazgV+Yu4zxrMgpLlONCm6R4lV0=",
"main.js": "t4pWkUIbwP1jLcNPxkl2YxvyvBjvtjnZoQ+69azt0YA="
"inner.js": "zlXCzaIdDSU0Nj9o9MFAzkB5lFZnP8COa06QGTTogr8=",
"main.js": "0bBJsDnc1DUVgySEEOaaXCrumZ0ZtHfHcPyqevc3rf8="
},
"worker": {
"inner.js": "EYAfsowm8FwpAIH+jvHOSq4oJY8cKVEd5aITL6laTkc=",
"main.js": "w1nL+SEtY6XHUKSkFwuCdLqCLirkeSVQRnDli3Pde60=",
"main.js": "JP41QsWgW8UQycfTlyfOzIHcQaP0OLxu43mnv8uqTRI=",
"messages.js": "Ts3t8tLymTSzR9xSx1/ewkJ7z7ilsh2OwiBQwsTtmM8=",
"todo.js": "iqa+cinRf8+8K49jGjd+hRmbT/S7wzKWePlmvTPV8Kw=",
"worker.js": "47EmUnfRV1jeroOkWXJRS2MRbGW6Y24L84tvsKuZ0eI="

View File

@ -1,5 +1,5 @@
define([
'/api/config',
'/common/config.js',
'/common/hyperscript.js',
'/common/common-language.js',
'/customize/messages.js',

View File

@ -1 +1 @@
95NPUtLS1528Uillt1vHvbZaQZeNOhVohjqBl908PIsE/nqX6zsgRxNnHzO05OmqvtSljScpJvNyNWXGiT3qC1syMiwiRzFLd2FKWVVFRHNBMVNELzZXdDR6MGxhc2tLekl3Z3FnczVjWUgwQ1cvbz0iXQ==
rGz6GRz7uY30l3H80Rf2YyuNr7lY4/GARF/oz+yLnME/0H00AxxoHZkQ4RUQiCVjywUBYfggz08hK1uch0VlAls3MywibnUxZWlzUGhRQ09WLzRuOVR3Y2U4VWdHWTRCSHlWNmVxVW05elhlQXFVND0iXQ==

View File

@ -5,6 +5,7 @@ const nThen = require('nthen');
const Crypto = require('crypto');
const Nacl = require('tweetnacl');
const Sortify = require('json.sortify');
const Saferphore = require('saferphore');
//const SigKey = require('~/.cryptpad_signing_key.json');
const KEY_FILE = process.env.HOME + '/.cryptpad_signing_key.json';
@ -23,6 +24,36 @@ const nameMapper = (name) => {
const PUBLIC_KEY = "MYaWgwAcOHIp3sZFGXeWsQX3u7U8PZrqIDaM2jNhXWY=";
const sema = Saferphore.create(20);
const forAllFiles = (dirs, onFile, onDone) => {
nThen((w) => {
const recurse = (dir) => {
sema.take(w((returnAfter) => {
Fs.readdir(dir, returnAfter(w((err, ret) => {
if (err) { throw err; }
ret.forEach((_f) => {
const f = dir + '/' + _f;
sema.take((returnAfter) => {
Fs.stat(f, returnAfter(w((err, stat) => {
if (err) { throw err; }
if (stat.isDirectory()) {
//console.log('DIR ', f);
recurse(f);
} else {
onFile(f);
}
})));
});
});
})));
}));
};
dirs.forEach((dir) => { recurse(dir); });
}).nThen(() => {
onDone();
});
};
const validate = (cb) => {
const key = Nacl.util.decodeBase64(PUBLIC_KEY);
Fs.readFile(VERSION_FILE, 'utf8', (err, ret) => {
@ -33,44 +64,58 @@ const validate = (cb) => {
});
};
const updateHtml = (fileHashes, done) => {
nThen((w) => {
forAllFiles(['./www'], (file) => {
sema.take((returnAfter) => {
Fs.readFile(file, 'utf8', w((err, ret) => {
if (err) { throw err; }
ret = ret.replace(/<!--BOOTLOAD_OUTER:"([^"]+)"-->(.+?)<!--BOOTLOAD_END-->/, (all, x, y) => {
let main = x;
if (x.indexOf('/')) { main = file.replace(/\/[^/]*$/, '/' + x).replace(/\.\/www/, ''); }
main = main.replace(/\.\/www/, '');
const hash = fileHashes['./www/common/sboot.js'];
if (!hash) { throw new Error("could not find hash of ./www/common/sboot.js"); }
return '<!--BOOTLOAD_OUTER:"' + x + '"--><script async data-bootload="' + main +
'" src="/common/sboot.js?ver=' + encodeURIComponent(hash) + '" integrity="sha256-' +
hash + '"></script><!--BOOTLOAD_END-->';
});
Fs.writeFile(file, 'utf8', ret, returnAfter(w((err) => {
if (err) { throw err; }
})));
}));
});
}, w());
}).nThen(() => {
done();
});
};
const hashFile = (file, out, done) => {
sema.take((returnAfter) => {
Fs.readFile(file, returnAfter((err, ret) => {
if (err) { throw err; }
out[file] = Crypto.createHash('sha256').update(ret).digest('base64');
if (done) { done(); }
}));
});
};
const release = () => {
const key = Nacl.sign.keyPair.fromSeed(new Buffer(require(KEY_FILE).seed, 'hex'));
const files = [];
const fileHashes = {};
let manifestHash;
let lastVersion = 0;
nThen((w) => {
const recurse = (dir) => {
Fs.readdir(dir, w((err, ret) => {
if (err) { throw err; }
ret.forEach((_f) => {
const f = dir + '/' + _f;
Fs.stat(f, w((err, stat) => {
if (err) { throw err; }
if (stat.isDirectory()) {
//console.log('DIR ', f);
recurse(f);
} else if (/\.js$/.test(f)) {
//console.log('FILE', f);
files.push(f);
}
}));
});
}));
};
recurse('./www');
recurse('./customize.dist');
forAllFiles(['./www', './customize.dist'], (file) => {
if (/\.js$/.test(file)) { hashFile(file, fileHashes, w()); }
}, w());
}).nThen((w) => {
let nt = nThen;
files.forEach((f) => {
nt = nt((w) => {
Fs.readFile(f, w((err, ret) => {
if (err) { throw err; }
fileHashes[f] = Crypto.createHash('sha256').update(ret).digest('base64');
}));
}).nThen;
});
nt(w());
updateHtml(fileHashes, w());
}).nThen((w) => {
forAllFiles(['./www', './customize.dist'], (file) => {
if (/\.js$/.test(file)) { hashFile(file, fileHashes, w()); }
}, w());
}).nThen((w) => {
const manifest = { files: {} };
Object.keys(fileHashes).forEach((k) => {

View File

@ -3,7 +3,7 @@
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
<!--BOOTLOAD_OUTER:"main.js"--><script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script><!--BOOTLOAD_END-->
<style>
.report {

View File

@ -2,7 +2,7 @@
<html class="cp">
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
<!--BOOTLOAD_OUTER:"main.js"--><script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script><!--BOOTLOAD_END-->
</head>
<body class="html">
</body>

View File

@ -5,7 +5,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"main.js"--><script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
</head>
<body class="html">
<noscript>

View File

@ -1,4 +1,4 @@
define(['/api/config'], function (ApiConfig) {
define(['/common/config.js'], function (ApiConfig) {
if (ApiConfig.httpSafeOrigin !== window.location.origin) {
window.alert('The bounce application must only be used from the sandbox domain, ' +
'please report this issue on https://github.com/xwiki-labs/cryptpad');

View File

@ -5,7 +5,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer" />
<script async data-bootload="/common/sframe-app-outer.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"/common/sframe-app-outer.js"--><script async data-bootload="/common/sframe-app-outer.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
<style>
html, body {
margin: 0px;

View File

@ -4,7 +4,7 @@ const define = (x:any, y:any) => {};
const require = define;
*/
define([
'/api/config'
'/common/config.js'
], function (Config) { /*::});module.exports = (function() {
const Config = (undefined:any);
*/

18
www/common/RequireJson.js Normal file
View File

@ -0,0 +1,18 @@
define(function () {
var api = {};
api.normalize = function(name, normalize) { return normalize(name); };
api.load = function(name, req, onLoad /*, config */) {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (this.readyState !== 4) { return; }
if (this.status === 200) {
try { onLoad(JSON.parse(xhr.responseText)); } catch (e) { onLoad.error(e); }
return;
}
onLoad.error("status: " + this.status);
};
xhr.open("GET", "/api/config.json");
xhr.send();
};
return api;
});

View File

@ -1,8 +1,9 @@
// This is stage 1, it can be changed but you must bump the version of the project.
define([
'/common/requireconfig.js'
], function (RequireConfig) {
require.config(RequireConfig());
'/common/config.js'
], function (ApiConfig) {
// require.config wants to mutate this
require.config(JSON.parse(JSON.stringify(ApiConfig.requireConf)));
// most of CryptPad breaks if you don't support isArray
if (!Array.isArray) {

View File

@ -1,6 +1,6 @@
define([
'jquery',
'/api/config',
'/common/config.js',
'/common/common-util.js',
'/common/common-hash.js',
'/common/common-language.js',

View File

@ -1,13 +1,40 @@
/*@flow*/
/*::const define = (x)=>{};*/
/*::const define = (x,y)=>{};*/
(function () {
var requireConf = {
// fix up locations so that relative urls work.
baseUrl: window.location.pathname,
paths: {
// jquery declares itself as literally "jquery" so it cannot be pulled by path :(
"jquery": "/bower_components/jquery/dist/jquery.min",
// json.sortify same
"json.sortify": "/bower_components/json.sortify/dist/JSON.sortify",
//"pdfjs-dist/build/pdf": "/bower_components/pdfjs-dist/build/pdf",
//"pdfjs-dist/build/pdf.worker": "/bower_components/pdfjs-dist/build/pdf.worker"
cm: '/bower_components/codemirror'
},
map: {
'*': {
'css': '/bower_components/require-css/css.js',
'less': '/common/RequireLess.js',
'json': '/common/RequireJson.js'
}
}
};
var extendRequireConf = function (ApiConfig) {
var out = JSON.parse(JSON.stringify(requireConf));
Object.keys(ApiConfig.requireConf).forEach(function (k) { out[k] = ApiConfig.requireConf[k]; });
ApiConfig.requireConf = Object.freeze(out);
};
var apiConf = window.CRYPTPAD_APICONF;
var manHash = window.CRYPTPAD_MANIFEST_HASH;
if (!apiConf) {
return void define(['/api/config'], function (x) { return x; });
return define(['json!/api/config.json'], function (x) {
extendRequireConf(x);
return Object.freeze(x);
});
}
define(function () {
console.log('x');
apiConf = apiConf || window.CRYPTPAD_APICONF;
manHash = manHash || window.CRYPTPAD_MANIFEST_HASH;
var cfg = JSON.parse(apiConf);
@ -19,6 +46,7 @@
}
cfg.httpSafeOrigin = window.location.origin;
}
return cfg;
extendRequireConf(cfg);
return Object.freeze(cfg);
});
}());
 }());

View File

@ -1,5 +1,5 @@
define([
'/api/config',
'/common/config.js',
'/customize/messages.js',
'/common/common-util.js',
'/common/common-hash.js',

View File

@ -1,4 +1,4 @@
define(['/api/config'], function (ApiConfig) {
define(['/common/config.js'], function (ApiConfig) {
var Module = {};
var isSupported = Module.isSupported = function () {

View File

@ -1,5 +1,5 @@
define([
'/api/config'
'/common/config.js'
], function (ApiConfig) {
var Config = {};

View File

@ -1,27 +0,0 @@
define([
'/common/config.js'
], function (ApiConfig) {
var out = {
// fix up locations so that relative urls work.
baseUrl: window.location.pathname,
paths: {
// jquery declares itself as literally "jquery" so it cannot be pulled by path :(
"jquery": "/bower_components/jquery/dist/jquery.min",
// json.sortify same
"json.sortify": "/bower_components/json.sortify/dist/JSON.sortify",
//"pdfjs-dist/build/pdf": "/bower_components/pdfjs-dist/build/pdf",
//"pdfjs-dist/build/pdf.worker": "/bower_components/pdfjs-dist/build/pdf.worker"
cm: '/bower_components/codemirror'
},
map: {
'*': {
'css': '/bower_components/require-css/css.js',
'less': '/common/RequireLess.js',
}
}
};
Object.keys(ApiConfig.requireConf).forEach(function (k) { out[k] = ApiConfig.requireConf[k]; });
return function () {
return JSON.parse(JSON.stringify(out));
};
});

View File

@ -51,9 +51,7 @@
node.setAttribute('integrity', 'sha256-' + hash);
};
window.require.config(Config.requireConf);
// TODO: this is crap
window.define('/api/config', function () { return JSON.parse(ConfigS); });
window.define('/common/boot2.js#manifest', function () { return manifest; });
window.require(['/common/boot2.js']);
}
);

View File

@ -3,25 +3,36 @@ define([
'/bower_components/nthen/index.js',
'/common/config.js',
'/common/dom-ready.js',
'/common/requireconfig.js',
'/common/sframe-common-outer.js'
], function (nThen, ApiConfig, DomReady, RequireConfig, SFCommonO) {
var requireConfig = RequireConfig();
'/common/sframe-common-outer.js',
'/common/boot2.js#manifest'
], function (nThen, ApiConfig, DomReady, SFCommonO, Manifest) {
var padType = window.location.pathname.replace(/\//g, '');
var hash = Manifest.files[padType]['inner.html'];
var url = ApiConfig.httpSafeOrigin + window.location.pathname +
'inner.html?ver=' + encodeURIComponent(hash);
nThen(function (waitFor) {
DomReady.onReady(waitFor());
// IE doesn't support integrity or fetch, so no security with IE
if (window.fetch) {
fetch(url, { integrity: 'sha256-' + hash }).then(waitFor()).catch(function (e) {
throw e;
});
}
}).nThen(function (waitFor) {
var req = {
cfg: requireConfig,
cfg: ApiConfig.requireConf,
req: [ '/common/loading.js' ],
pfx: window.location.origin,
apiConfS: JSON.stringify(ApiConfig)
apiConfS: JSON.stringify(ApiConfig),
requireHash: Manifest.files.bower_components.requirejs['require.js']
};
window.rc = requireConfig;
window.rc = ApiConfig.requireConf;
window.apiconf = ApiConfig;
document.getElementById('sbox-iframe').setAttribute('src',
ApiConfig.httpSafeOrigin + window.location.pathname + 'inner.html?' +
requireConfig.urlArgs + '#' + encodeURIComponent(JSON.stringify(req)));
var ifr = document.getElementById('sbox-iframe');
ifr.setAttribute('src',
ApiConfig.httpSafeOrigin + window.location.pathname + 'inner.html?ver=' +
encodeURIComponent(hash) + '#' + encodeURIComponent(JSON.stringify(req)));
ifr.setAttribute('integrity', hash);
// This is a cheap trick to avoid loading sframe-channel in parallel with the
// loading screen setup.

View File

@ -1,11 +1,8 @@
// This is stage 1, it can be changed but you must bump the version of the project.
// Note: This must only be loaded from inside of a sandbox-iframe.
define([
'/common/requireconfig.js',
'/common/test.js'
], function (RequireConfig, Test) {
require.config(RequireConfig());
], function (Test) {
// most of CryptPad breaks if you don't support isArray
if (!Array.isArray) {
Array.isArray = function(arg) { // CRYPTPAD_SHIM

View File

@ -1,7 +1,7 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/api/config',
'/common/config.js',
'jquery',
], function (nThen, ApiConfig, $) {
var common = {};

View File

@ -29,7 +29,6 @@ var afterLoaded = function (req) {
node.setAttribute('src', newSrc);
node.setAttribute('integrity', 'sha256-' + hash);
};
require.config(req.cfg);
var txid = Math.random().toString(16).replace('0.', '');
var intr;
var ready = function () {
@ -38,10 +37,15 @@ var afterLoaded = function (req) {
window.parent.postMessage(JSON.stringify({ q: 'READY', txid: txid }), '*');
}, 1);
};
require(['/customize/manifest.js'], function (m) {
manifest = m;
if (req.req) { require(req.req, ready); } else { ready(); }
});
var hasRequire = function () {
require.config(req.cfg);
window.defineManifest = function (m) {
manifest = m;
delete window.defineManifest;
if (req.req) { require(req.req, ready); } else { ready(); }
};
require(['/customize/manifest.js'], function () { });
};
var onReply = function (msg) {
var data = JSON.parse(msg.data);
if (data.txid !== txid) { return; }
@ -85,6 +89,14 @@ var afterLoaded = function (req) {
require(['/common/sframe-boot2.js'], function () { });
};
window.addEventListener('message', onReply);
var scr = document.createElement('script');
scr.setAttribute('integrity', 'sha256-' + req.requireHash);
scr.src = '/bower_components/requirejs/require.js?ver=' + encodeURIComponent(req.requireHash);
scr.async = true;
scr.charset = 'utf-8';
scr.type = 'text/javascript';
scr.addEventListener('load', hasRequire, false);
document.getElementsByTagName('head')[0].appendChild(scr);
};
var load0 = function () {

View File

@ -1,7 +1,7 @@
define([
'jquery',
'/customize/application_config.js',
'/api/config',
'/common/config.js',
'/common/common-ui-elements.js',
'/common/common-interface.js',
'/common/common-hash.js',

View File

@ -5,7 +5,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer" />
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"main.js"--><script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
<style>
html, body {
margin: 0px;

View File

@ -1,26 +1,23 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/api/config',
'/common/config.js',
'/common/dom-ready.js',
'/common/requireconfig.js',
'/common/sframe-common-outer.js'
], function (nThen, ApiConfig, DomReady, RequireConfig, SFCommonO) {
var requireConfig = RequireConfig();
], function (nThen, ApiConfig, DomReady, SFCommonO) {
// Loaded in load #2
nThen(function (waitFor) {
DomReady.onReady(waitFor());
}).nThen(function (waitFor) {
var req = {
cfg: requireConfig,
cfg: ApiConfig.requireConf,
req: [ '/common/loading.js' ],
pfx: window.location.origin
};
window.rc = requireConfig;
window.rc = ApiConfig.requireConf;
window.apiconf = ApiConfig;
document.getElementById('sbox-iframe').setAttribute('src',
ApiConfig.httpSafeOrigin + '/contacts/inner.html?' + requireConfig.urlArgs +
ApiConfig.httpSafeOrigin + '/contacts/inner.html?' + ApiConfig.requireConf.urlArgs +
'#' + encodeURIComponent(JSON.stringify(req)));
// This is a cheap trick to avoid loading sframe-channel in parallel with the

View File

@ -5,7 +5,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer" />
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"main.js"--><script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
<style>
html, body {
margin: 0px;

View File

@ -7,7 +7,7 @@ define([
'/bower_components/nthen/index.js',
'/common/sframe-common.js',
'/common/common-interface.js',
'/api/config',
'/common/config.js',
'/common/common-realtime.js',
'/customize/messages.js',
'/customize/application_config.js',

View File

@ -1,9 +1,8 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/api/config',
'/common/config.js',
'jquery',
'/common/requireconfig.js',
'/common/sframe-common-outer.js',
'/common/cryptpad-common.js',
'/common/common-util.js',
@ -11,7 +10,7 @@ define([
'/common/common-realtime.js',
'/common/common-constants.js',
'/common/common-interface.js',
], function (nThen, ApiConfig, $, RequireConfig, SFCommonO,
], function (nThen, ApiConfig, $, SFCommonO,
Cryptpad, Util, Hash, Realtime, Constants, UI) {
window.Cryptpad = {
@ -23,21 +22,19 @@ define([
UI: UI
};
var requireConfig = RequireConfig();
// Loaded in load #2
nThen(function (waitFor) {
$(waitFor());
}).nThen(function (waitFor) {
var req = {
cfg: requireConfig,
cfg: ApiConfig.requireConf,
req: [ '/common/loading.js' ],
pfx: window.location.origin
};
window.rc = requireConfig;
window.rc = ApiConfig.requireConf;
window.apiconf = ApiConfig;
$('#sbox-iframe').attr('src',
ApiConfig.httpSafeOrigin + '/debug/inner.html?' + requireConfig.urlArgs +
ApiConfig.httpSafeOrigin + '/debug/inner.html?' + ApiConfig.requireConf.urlArgs +
'#' + encodeURIComponent(JSON.stringify(req)));
// This is a cheap trick to avoid loading sframe-channel in parallel with the

View File

@ -5,7 +5,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer" />
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"main.js"--><script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
<style>
html, body {
margin: 0px;

View File

@ -1,26 +1,23 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/api/config',
'/common/config.js',
'/common/dom-ready.js',
'/common/requireconfig.js',
'/common/sframe-common-outer.js',
], function (nThen, ApiConfig, DomReady, RequireConfig, SFCommonO) {
var requireConfig = RequireConfig();
], function (nThen, ApiConfig, DomReady, SFCommonO) {
// Loaded in load #2
nThen(function (waitFor) {
DomReady.onReady(waitFor());
}).nThen(function (waitFor) {
var req = {
cfg: requireConfig,
cfg: ApiConfig.requireConf,
req: [ '/common/loading.js' ],
pfx: window.location.origin
};
window.rc = requireConfig;
window.rc = ApiConfig.requireConf;
window.apiconf = ApiConfig;
document.getElementById('sbox-iframe').setAttribute('src',
ApiConfig.httpSafeOrigin + '/drive/inner.html?' + requireConfig.urlArgs +
ApiConfig.httpSafeOrigin + '/drive/inner.html?' + ApiConfig.requireConf.urlArgs +
'#' + encodeURIComponent(JSON.stringify(req)));
// This is a cheap trick to avoid loading sframe-channel in parallel with the

View File

@ -1,6 +1,6 @@
define([
'jquery',
'/api/config',
'/common/config.js',
'/bower_components/chainpad-listmap/chainpad-listmap.js',
'/bower_components/chainpad-crypto/crypto.js',
'/common/cryptpad-common.js'

View File

@ -1,6 +1,6 @@
define([
'jquery',
'/api/config',
'/common/config.js',
'/bower_components/chainpad-netflux/chainpad-netflux.js',
'/bower_components/chainpad-crypto/crypto.js',
'/bower_components/marked/marked.min.js',

View File

@ -1,26 +1,23 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/api/config',
'/common/config.js',
'/common/dom-ready.js',
'/common/requireconfig.js',
'/common/sframe-common-outer.js'
], function (nThen, ApiConfig, DomReady, RequireConfig, SFCommonO) {
var requireConfig = RequireConfig();
], function (nThen, ApiConfig, DomReady, SFCommonO) {
// Loaded in load #2
nThen(function (waitFor) {
DomReady.onReady(waitFor());
}).nThen(function (waitFor) {
var req = {
cfg: requireConfig,
cfg: ApiConfig.requireConf,
req: [ '/common/loading.js' ],
pfx: window.location.origin
};
window.rc = requireConfig;
window.rc = ApiConfig.requireConf;
window.apiconf = ApiConfig;
document.getElementById('sbox-iframe').setAttribute('src',
ApiConfig.httpSafeOrigin + '/file/inner.html?' + requireConfig.urlArgs +
ApiConfig.httpSafeOrigin + '/file/inner.html?' + ApiConfig.requireConf.urlArgs +
'#' + encodeURIComponent(JSON.stringify(req)));
// This is a cheap trick to avoid loading sframe-channel in parallel with the

View File

@ -5,7 +5,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer" />
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"main.js"--><script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
<style>
html, body {
margin: 0px;

View File

@ -1,12 +1,9 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/api/config',
'jquery',
'/common/requireconfig.js',
], function (nThen, ApiConfig, $, RequireConfig) {
var requireConfig = RequireConfig();
'/common/config.js',
'jquery'
], function (nThen, ApiConfig, $) {
var create = function (config) {
// Loaded in load #2
var sframeChan;
@ -14,14 +11,14 @@ define([
$(waitFor());
}).nThen(function (waitFor) {
var req = {
cfg: requireConfig,
cfg: ApiConfig.requireConf,
req: [ '/common/loading.js' ],
pfx: window.location.origin
};
window.rc = requireConfig;
window.rc = ApiConfig.requireConf;
window.apiconf = ApiConfig;
$('#sbox-filePicker-iframe').attr('src',
ApiConfig.httpSafeOrigin + '/filepicker/inner.html?' + requireConfig.urlArgs +
ApiConfig.httpSafeOrigin + '/filepicker/inner.html?' + ApiConfig.requireConf.urlArgs +
'#' + encodeURIComponent(JSON.stringify(req)));
// This is a cheap trick to avoid loading sframe-channel in parallel with the

View File

@ -6,7 +6,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"/customize/template.js"--><script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
<link rel="stylesheet" href="/bower_components/codemirror/lib/codemirror.css">
<link rel="stylesheet" href="/bower_components/codemirror/addon/dialog/dialog.css">

View File

@ -6,7 +6,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer" />
<script async data-bootload="/common/sframe-app-outer.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"/common/sframe-app-outer.js"--><script async data-bootload="/common/sframe-app-outer.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
<style>
html,
body {

View File

@ -6,7 +6,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"/customize/template.js"--><script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
</head>
<body class="html">
<noscript>

View File

@ -5,7 +5,7 @@
<title data-localization="main_title">CryptPad: Zero Knowledge, Collaborative Real Time Editing</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<script async data-main="main" src="/bower_components/requirejs/require.js"></script>
<!--BOOTLOAD_OUTER:"main.js"--><script async data-main="main" src="/bower_components/requirejs/require.js"></script><!--BOOTLOAD_END-->
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
</head>
<body class="html">

View File

@ -1,7 +1,7 @@
<html>
<head>
<title>Test media-tag</title>
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"main.js"--><script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
<style>
media-tag * {
max-width: 60vw;

View File

@ -19,7 +19,7 @@ zyJab2jW55cPvjTL9kndZoV0NLstYw==
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer" />
<script async data-bootload="/common/sframe-app-outer.js" src="/common/sboot.js" integrity="sha256-zKt3KH6sKFs2vzvo0lYJHVJZDzRz6pljOoVY4hJsiRI="></script>
<!--BOOTLOAD_OUTER:"/common/sframe-app-outer.js"--><script async data-bootload="/common/sframe-app-outer.js" src="/common/sboot.js?ver=%2FBdCljyCUwnpFZffkyQCR7EDnmQsERwUzDj4eqW9jiE%3D" integrity="sha256-8IaxCUqjpzoP7AEPEk++VQ+Bk83mRdXx4dK+XvSNPcI="></script><!--BOOTLOAD_END-->
<style>
html, body {
margin: 0px;

View File

@ -2,7 +2,7 @@
<html class="cp-app-noscroll">
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<script async data-bootload="/pad/inner.js" data-main="/common/sframe-boot.js?ver=1.6" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="/pad/inner.js" src="/common/sframe-sboot.js?ver=uXpscya3OqDmGUdHZ4p8bO2QSmXBnIXx8%2F%2BjN8zpbog%3D" integrity=""></script>
<style>
html, body {
margin: 0px;

View File

@ -1,4 +1,4 @@
require(['/api/config'], function (ApiConfig) {
require(['/common/config.js'], function (ApiConfig) {
// see ckeditor_base.js getUrl()
window.CKEDITOR_GETURL = function (resource) {
if (resource.indexOf( '/' ) === 0) {
@ -27,7 +27,7 @@ define([
'/pad/links.js',
'/bower_components/nthen/index.js',
'/common/media-tag.js',
'/api/config',
'/common/config.js',
'/common/common-hash.js',
'/common/common-util.js',
'/bower_components/chainpad/chainpad.dist.js',

View File

@ -8,7 +8,7 @@
* mode, which handles the main editing area space.
*/
define(['/api/config'], function (ApiConfig) {
define(['/common/config.js'], function (ApiConfig) {
var framedWysiwyg;
var iframe;

View File

@ -5,7 +5,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer" />
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"main.js"--><script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
<style>
html, body {
margin: 0px;

View File

@ -1,26 +1,23 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/api/config',
'/common/config.js',
'/common/dom-ready.js',
'/common/requireconfig.js',
'/common/sframe-common-outer.js',
], function (nThen, ApiConfig, DomReady, RequireConfig, SFCommonO) {
var requireConfig = RequireConfig();
], function (nThen, ApiConfig, DomReady, SFCommonO) {
// Loaded in load #2
nThen(function (waitFor) {
DomReady.onReady(waitFor());
}).nThen(function (waitFor) {
var req = {
cfg: requireConfig,
cfg: ApiConfig.requireConf,
req: [ '/common/loading.js' ],
pfx: window.location.origin
};
window.rc = requireConfig;
window.rc = ApiConfig.requireConf;
window.apiconf = ApiConfig;
document.getElementById('sbox-iframe').setAttribute('src',
ApiConfig.httpSafeOrigin + '/poll/inner.html?' + requireConfig.urlArgs +
ApiConfig.httpSafeOrigin + '/poll/inner.html?' + ApiConfig.requireConf.urlArgs +
'#' + encodeURIComponent(JSON.stringify(req)));
// This is a cheap trick to avoid loading sframe-channel in parallel with the

View File

@ -5,7 +5,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer" />
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"main.js"--><script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
<style>
html, body {
margin: 0px;

View File

@ -1,26 +1,23 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/api/config',
'/common/config.js',
'/common/dom-ready.js',
'/common/requireconfig.js',
'/common/sframe-common-outer.js',
], function (nThen, ApiConfig, DomReady, RequireConfig, SFCommonO) {
var requireConfig = RequireConfig();
], function (nThen, ApiConfig, DomReady, SFCommonO) {
// Loaded in load #2
nThen(function (waitFor) {
DomReady.onReady(waitFor());
}).nThen(function (waitFor) {
var req = {
cfg: requireConfig,
cfg: ApiConfig.requireConf,
req: [ '/common/loading.js' ],
pfx: window.location.origin
};
window.rc = requireConfig;
window.rc = ApiConfig.requireConf;
window.apiconf = ApiConfig;
document.getElementById('sbox-iframe').setAttribute('src',
ApiConfig.httpSafeOrigin + '/profile/inner.html?' + requireConfig.urlArgs +
ApiConfig.httpSafeOrigin + '/profile/inner.html?' + ApiConfig.requireConf.urlArgs +
'#' + encodeURIComponent(JSON.stringify(req)));
// This is a cheap trick to avoid loading sframe-channel in parallel with the

View File

@ -6,7 +6,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"/customize/template.js"--><script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
</head>
<body class="html">
<noscript>

View File

@ -5,7 +5,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer" />
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"main.js"--><script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
<style>
html, body {
margin: 0px;

View File

@ -10,7 +10,7 @@ define([
'/customize/messages.js',
'/common/hyperscript.js',
'/customize/application_config.js',
'/api/config',
'/common/config.js',
'/bower_components/file-saver/FileSaver.min.js',
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',

View File

@ -1,26 +1,23 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/api/config',
'/common/config.js',
'/common/dom-ready.js',
'/common/requireconfig.js',
'/common/sframe-common-outer.js'
], function (nThen, ApiConfig, DomReady, RequireConfig, SFCommonO) {
var requireConfig = RequireConfig();
], function (nThen, ApiConfig, DomReady, SFCommonO) {
// Loaded in load #2
nThen(function (waitFor) {
DomReady.onReady(waitFor());
}).nThen(function (waitFor) {
var req = {
cfg: requireConfig,
cfg: ApiConfig.requireConf,
req: [ '/common/loading.js' ],
pfx: window.location.origin
};
window.rc = requireConfig;
window.rc = ApiConfig.requireConf;
window.apiconf = ApiConfig;
document.getElementById('sbox-iframe').setAttribute('src',
ApiConfig.httpSafeOrigin + '/settings/inner.html?' + requireConfig.urlArgs +
ApiConfig.httpSafeOrigin + '/settings/inner.html?' + ApiConfig.requireConf.urlArgs +
'#' + encodeURIComponent(JSON.stringify(req)));
// This is a cheap trick to avoid loading sframe-channel in parallel with the

View File

@ -5,7 +5,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer" />
<script async data-bootload="/common/sframe-app-outer.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"/common/sframe-app-outer.js"--><script async data-bootload="/common/sframe-app-outer.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
<style>
html, body {
margin: 0px;

View File

@ -5,7 +5,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer" />
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"main.js"--><script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
<style>
html, body {
margin: 0px;

View File

@ -1,26 +1,23 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/api/config',
'/common/config.js',
'/common/dom-ready.js',
'/common/requireconfig.js',
'/common/sframe-common-outer.js'
], function (nThen, ApiConfig, DomReady, RequireConfig, SFCommonO) {
var requireConfig = RequireConfig();
], function (nThen, ApiConfig, DomReady, SFCommonO) {
// Loaded in load #2
nThen(function (waitFor) {
DomReady.onReady(waitFor());
}).nThen(function (waitFor) {
var req = {
cfg: requireConfig,
cfg: ApiConfig.requireConf,
req: [ '/common/loading.js' ],
pfx: window.location.origin
};
window.rc = requireConfig;
window.rc = ApiConfig.requireConf;
window.apiconf = ApiConfig;
document.getElementById('sbox-iframe').setAttribute('src',
ApiConfig.httpSafeOrigin + '/todo/inner.html?' + requireConfig.urlArgs +
ApiConfig.httpSafeOrigin + '/todo/inner.html?' + ApiConfig.requireConf.urlArgs +
'#' + encodeURIComponent(JSON.stringify(req)));
// This is a cheap trick to avoid loading sframe-channel in parallel with the

View File

@ -6,7 +6,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"/customize/template.js"--><script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
</head>
<body class="html">
<noscript>

View File

@ -5,7 +5,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer" />
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"main.js"--><script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
<style>
html, body {
margin: 0px;

View File

@ -7,7 +7,7 @@ define([
'/bower_components/nthen/index.js',
'/common/sframe-common.js',
'/common/common-interface.js',
'/api/config',
'/common/config.js',
'/common/common-realtime.js',
'/customize/pages.js',
'/customize/messages.js',

View File

@ -1,26 +1,23 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/api/config',
'/common/config.js',
'/common/dom-ready.js',
'/common/requireconfig.js',
'/common/sframe-common-outer.js'
], function (nThen, ApiConfig, DomReady, RequireConfig, SFCommonO) {
var requireConfig = RequireConfig();
], function (nThen, ApiConfig, DomReady, SFCommonO) {
// Loaded in load #2
nThen(function (waitFor) {
DomReady.onReady(waitFor());
}).nThen(function (waitFor) {
var req = {
cfg: requireConfig,
cfg: ApiConfig.requireConf,
req: [ '/common/loading.js' ],
pfx: window.location.origin
};
window.rc = requireConfig;
window.rc = ApiConfig.requireConf;
window.apiconf = ApiConfig;
document.getElementById('sbox-iframe').setAttribute('src',
ApiConfig.httpSafeOrigin + '/whiteboard/inner.html?' + requireConfig.urlArgs +
ApiConfig.httpSafeOrigin + '/whiteboard/inner.html?' + ApiConfig.requireConf.urlArgs +
'#' + encodeURIComponent(JSON.stringify(req)));
// This is a cheap trick to avoid loading sframe-channel in parallel with the

View File

@ -5,7 +5,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer" />
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<!--BOOTLOAD_OUTER:"main.js"--><script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script><!--BOOTLOAD_END-->
<style>
html, body {
margin: 0px;

View File

@ -1,26 +1,23 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/api/config',
'/common/config.js',
'/common/dom-ready.js',
'/common/requireconfig.js',
'/common/sframe-common-outer.js'
], function (nThen, ApiConfig, DomReady, RequireConfig, SFCommonO) {
var requireConfig = RequireConfig();
], function (nThen, ApiConfig, DomReady, SFCommonO) {
// Loaded in load #2
nThen(function (waitFor) {
DomReady.onReady(waitFor());
}).nThen(function (waitFor) {
var req = {
cfg: requireConfig,
cfg: ApiConfig.requireConf,
req: [ '/common/loading.js' ],
pfx: window.location.origin
};
window.rc = requireConfig;
window.rc = ApiConfig.requireConf;
window.apiconf = ApiConfig;
document.getElementById('sbox-iframe').setAttribute('src',
ApiConfig.httpSafeOrigin + '/worker/inner.html?' + requireConfig.urlArgs +
ApiConfig.httpSafeOrigin + '/worker/inner.html?' + ApiConfig.requireConf.urlArgs +
'#' + encodeURIComponent(JSON.stringify(req)));
// This is a cheap trick to avoid loading sframe-channel in parallel with the