Skip to content

Commit 996dd3c

Browse files
authored
Repair lockdown meta url notice on Source Code page (#1549)
* Link in the FAQ for this Post #944 #970 #389 ... missed somewhere around #976 to #1208 *(vaguely recall this was on the script homepage originally and moved to source code page)*. Needed for #1548 to calm network traffic issues which appear to be global with Level3. Over 17,000 sites are down according to pingdom. Auto-merge
1 parent cecbc2e commit 996dd3c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

controllers/script.js

-5
Original file line numberDiff line numberDiff line change
@@ -382,11 +382,6 @@ exports.view = function (aReq, aRes, aNext) {
382382
options.isMod = authedUser && authedUser.isMod;
383383
options.isAdmin = authedUser && authedUser.isAdmin;
384384

385-
// Lockdown
386-
options.lockdown = {};
387-
options.lockdown.scriptStorageRO = process.env.READ_ONLY_SCRIPT_STORAGE === 'true';
388-
options.lockdown.updateURLCheck = process.env.FORCE_BUSY_UPDATEURL_CHECK === 'true';
389-
390385
// Script
391386
options.script = script = modelParser.parseScript(aScript);
392387
options.isOwner = authedUser && authedUser._id == script._authorId;

controllers/user.js

+5
Original file line numberDiff line numberDiff line change
@@ -2059,6 +2059,11 @@ exports.editScript = function (aReq, aRes, aNext) {
20592059
return;
20602060
}
20612061

2062+
// Lockdown
2063+
options.lockdown = {};
2064+
options.lockdown.scriptStorageRO = process.env.READ_ONLY_SCRIPT_STORAGE === 'true';
2065+
options.lockdown.updateURLCheck = process.env.FORCE_BUSY_UPDATEURL_CHECK === 'true';
2066+
20622067
// Script
20632068
options.script = script = modelParser.parseScript(aScript);
20642069

views/pages/documentPage.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ <h3><a id="welcome" rel="bookmark"></a>Welcome<a class="anchor" href="#welcome">
2020
<p>Welcome to {{#pkg.name}}{{pkg.name}} <em>(OUJS)</em>{{#pkg.version}} v{{pkg.version}}{{/pkg.version}}{{/pkg.name}}{{#process.version}} using Node {{process.version}}{{/process.version}}{{#lastRestart}} last restarted <time datetime="{{lastRestartISOFormat}}" title="{{lastRestart}}">{{lastRestartHumanized}}</time>.{{/lastRestart}}</p>
2121
<ul>
2222
{{#lockdown.scriptStorageRO}}<li>Read-Only Script storage mode is in effect.</li>{{/lockdown.scriptStorageRO}}
23-
{{#lockdown.updateURLCheck}}<li>UserScript metadata block <code>// @updateURL</code> is required.</li>{{/lockdown.updateURLCheck}}
23+
{{#lockdown.updateURLCheck}}<li>UserScript metadata block <code>// @updateURL</code> is required. See <a href="/about/Frequently-Asked-Questions#q-does-openuserjs-org-have-meta-">this FAQ</a>.</li>{{/lockdown.updateURLCheck}}
2424
<li><em>No other site status messages at this time.</em></li>
2525
</ul>
2626
<h3><a id="mission" rel="bookmark"></a>Mission<a class="anchor" href="#mission"><em class="fa fa-link"></em></a></h3>

0 commit comments

Comments
 (0)