File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ < script type ="application/javascript ">
2+ window . QPixel ||= { } ;
3+
4+ Object . defineProperty ( QPixel , 'ALLOWED_POST_ATTRS' , {
5+ configurable : false ,
6+ value : Object . freeze ( <%= raw PostsHelper ::PostScrubber ::ALLOWED_ATTRS %> ) ,
7+ writable : false ,
8+ } ) ;
9+
10+ Object . defineProperty ( QPixel , 'ALLOWED_POST_TAGS' , {
11+ configurable : false ,
12+ value : Object . freeze ( <%= raw PostsHelper ::PostScrubber ::ALLOWED_TAGS %> ) ,
13+ writable : false ,
14+ } ) ;
15+
16+ Object . defineProperty ( QPixel , 'MAX_UPLOAD_SIZE' , {
17+ configurable : false ,
18+ value : "<%= SiteSetting [ 'MaxUploadSize' ] || '2MB' %> " ,
19+ writable : false ,
20+ } ) ;
21+ </ script >
Original file line number Diff line number Diff line change 4646<%= javascript_include_tag 'application' %>
4747< script src ="https://cdn.jsdelivr.net/npm/@codidact/co-design@latest/js/co-design.js " defer > </ script >
4848
49- < script type ="application/javascript ">
50- window . QPixel ||= { } ;
51-
52- Object . defineProperty ( QPixel , 'ALLOWED_POST_ATTRS' , {
53- configurable : false ,
54- value : Object . freeze ( <%= raw PostsHelper ::PostScrubber ::ALLOWED_ATTRS %> ) ,
55- writable : false ,
56- } ) ;
57-
58- Object . defineProperty ( QPixel , 'ALLOWED_POST_TAGS' , {
59- configurable : false ,
60- value : Object . freeze ( <%= raw PostsHelper ::PostScrubber ::ALLOWED_TAGS %> ) ,
61- writable : false ,
62- } ) ;
63- </ script >
49+ <%= render 'layouts/expose' %>
6450
6551<% if SiteSetting [ 'SyntaxHighlightingEnabled' ] %>
6652 < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.0.1/styles/default.min.css ">
Original file line number Diff line number Diff line change @@ -386,6 +386,10 @@ interface QPixel {
386386 * List of attributes allowed on HTML tags in posts, supplied by the server
387387 */
388388 readonly ALLOWED_POST_ATTRS ?: readonly string [ ]
389+ /**
390+ * Maximum file upload size (arbitrary unit)
391+ */
392+ readonly MAX_UPLOAD_SIZE ?: string
389393
390394 // private properties
391395 _filters ?: Record < string , QPixelFilter > | null ;
You can’t perform that action at this time.
0 commit comments