mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Expando: Feature flag nsfw flow
This commit is contained in:
@@ -598,6 +598,13 @@ module["reddit-init"] = LocalizedModule("reddit-init.js",
|
||||
wrap=catch_errors,
|
||||
)
|
||||
|
||||
module["expando-nsfw-flow"] = Module("expando-nsfw-flow.js",
|
||||
TemplateFileSource('ui/formbar.html'),
|
||||
"ui/formbar.js",
|
||||
TemplateFileSource('expando/nsfwgate.html'),
|
||||
"expando/nsfwflow.js",
|
||||
)
|
||||
|
||||
module["reddit"] = LocalizedModule("reddit.js",
|
||||
"lib/jquery.url.js",
|
||||
"lib/backbone-1.0.0.js",
|
||||
@@ -633,10 +640,7 @@ module["reddit"] = LocalizedModule("reddit.js",
|
||||
"embed.js",
|
||||
"post-sharing.js",
|
||||
"expando.js",
|
||||
TemplateFileSource('ui/formbar.html'),
|
||||
"ui/formbar.js",
|
||||
TemplateFileSource('expando/nsfwgate.html'),
|
||||
"expando/nsfwflow.js",
|
||||
# inline expando-nsfw-flow.js module here when unflagged
|
||||
"saved.js",
|
||||
"cache-poisoning-detection.js",
|
||||
"messages.js",
|
||||
|
||||
@@ -290,6 +290,8 @@ class Reddit(Templated):
|
||||
|
||||
if feature.is_enabled("new_expando_icons"):
|
||||
self.feature_new_expando_icons = True
|
||||
if feature.is_enabled("expando_nsfw_flow"):
|
||||
self.feature_expando_nsfw_flow = True
|
||||
|
||||
# generate a canonical link for google
|
||||
canonical_url = UrlParser(canonical_link or request.url)
|
||||
|
||||
@@ -127,6 +127,9 @@
|
||||
<%def name="javascript_bottom()">
|
||||
<% from r2.lib import js %>
|
||||
${unsafe(js.use('reddit'))}
|
||||
%if getattr(thing, "feature_expando_nsfw_flow", False):
|
||||
${unsafe(js.use("expando-nsfw-flow"))}
|
||||
%endif
|
||||
${unsafe(c.js_preload.use())}
|
||||
</%def>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user