mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-30 18:24:29 +01:00
{% (end)?raw %}
⇒ {% (end)?verbatim %}
``` rg '\{%\s*raw' -l | xargs -I{} sed -i -e 's/{%\(\s*\)raw/{%\1verbatim/g; s/endraw\(\s*\)%}/endverbatim\1%}/g' {} ``` Close vichan-devel/vichan#452.
This commit is contained in:
parent
4fd93f490f
commit
484806c475
@ -42,8 +42,8 @@
|
||||
<br><a href="https://engine.vichan.net/">vichan</a> Copyright © 2012-2018 vichan-devel</p>
|
||||
{% for footer in config.footer %}<p class="unimportant" style="text-align:center;">{{ footer }}</p>{% endfor %}
|
||||
</footer>
|
||||
<script type="text/javascript">{% raw %}
|
||||
<script type="text/javascript">{% verbatim %}
|
||||
ready();
|
||||
{% endraw %}</script>
|
||||
{% endverbatim %}</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -18,7 +18,7 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if config.recaptcha %}<script src="//www.google.com/recaptcha/api.js"></script>
|
||||
<style type="text/css">{% raw %}
|
||||
<style type="text/css">{% verbatim %}
|
||||
#recaptcha_area {
|
||||
float: none !important;
|
||||
padding: 0 !important;
|
||||
@ -46,4 +46,4 @@
|
||||
.recaptchatable, #recaptcha_area tr, #recaptcha_area td, #recaptcha_area th {
|
||||
padding: 0 !important;
|
||||
}
|
||||
{% endraw %}</style>{% endif %}
|
||||
{% endverbatim %}</style>{% endif %}
|
||||
|
@ -96,9 +96,9 @@
|
||||
|
||||
{% for footer in config.footer %}<p class="unimportant" style="text-align:center;">{{ footer }}</p>{% endfor %}
|
||||
</footer>
|
||||
<script type="text/javascript">{% raw %}
|
||||
<script type="text/javascript">{% verbatim %}
|
||||
ready();
|
||||
{% endraw %}</script>
|
||||
{% endverbatim %}</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% raw %}
|
||||
{% verbatim %}
|
||||
|
||||
/* gettext-compatible _ function, example of usage:
|
||||
*
|
||||
@ -109,11 +109,11 @@ function alert(a, do_confirm, confirm_ok_action, confirm_cancel_action) {
|
||||
var saved = {};
|
||||
|
||||
|
||||
var selectedstyle = '{% endraw %}{{ config.default_stylesheet.0|addslashes }}{% raw %}';
|
||||
var selectedstyle = '{% endverbatim %}{{ config.default_stylesheet.0|addslashes }}{% verbatim %}';
|
||||
var styles = {
|
||||
{% endraw %}
|
||||
{% for stylesheet in stylesheets %}{% raw %}'{% endraw %}{{ stylesheet.name|addslashes }}{% raw %}' : '{% endraw %}{{ stylesheet.uri|addslashes }}{% raw %}',
|
||||
{% endraw %}{% endfor %}{% raw %}
|
||||
{% endverbatim %}
|
||||
{% for stylesheet in stylesheets %}{% verbatim %}'{% endverbatim %}{{ stylesheet.name|addslashes }}{% verbatim %}' : '{% endverbatim %}{{ stylesheet.uri|addslashes }}{% verbatim %}',
|
||||
{% endverbatim %}{% endfor %}{% verbatim %}
|
||||
};
|
||||
|
||||
if (typeof board_name === 'undefined') {
|
||||
@ -121,16 +121,16 @@ if (typeof board_name === 'undefined') {
|
||||
}
|
||||
|
||||
function changeStyle(styleName, link) {
|
||||
{% endraw %}
|
||||
{% if config.stylesheets_board %}{% raw %}
|
||||
{% endverbatim %}
|
||||
{% if config.stylesheets_board %}{% verbatim %}
|
||||
if (board_name) {
|
||||
stylesheet_choices[board_name] = styleName;
|
||||
localStorage.board_stylesheets = JSON.stringify(stylesheet_choices);
|
||||
}
|
||||
{% endraw %}{% else %}
|
||||
{% endverbatim %}{% else %}
|
||||
localStorage.stylesheet = styleName;
|
||||
{% endif %}
|
||||
{% raw %}
|
||||
{% verbatim %}
|
||||
|
||||
if (!document.getElementById('stylesheet')) {
|
||||
var s = document.createElement('link');
|
||||
@ -160,9 +160,9 @@ function changeStyle(styleName, link) {
|
||||
}
|
||||
|
||||
|
||||
{% endraw %}
|
||||
{% endverbatim %}
|
||||
{% if config.stylesheets_board %}
|
||||
{% raw %}
|
||||
{% verbatim %}
|
||||
|
||||
if (!localStorage.board_stylesheets) {
|
||||
localStorage.board_stylesheets = '{}';
|
||||
@ -177,9 +177,9 @@ function changeStyle(styleName, link) {
|
||||
}
|
||||
}
|
||||
}
|
||||
{% endraw%}
|
||||
{% endverbatim%}
|
||||
{% else %}
|
||||
{% raw %}
|
||||
{% verbatim %}
|
||||
if (localStorage.stylesheet) {
|
||||
for (var styleName in styles) {
|
||||
if (styleName == localStorage.stylesheet) {
|
||||
@ -188,9 +188,9 @@ function changeStyle(styleName, link) {
|
||||
}
|
||||
}
|
||||
}
|
||||
{% endraw %}
|
||||
{% endverbatim %}
|
||||
{% endif %}
|
||||
{% raw %}
|
||||
{% verbatim %}
|
||||
|
||||
function init_stylechooser() {
|
||||
var newElement = document.createElement('div');
|
||||
@ -243,7 +243,7 @@ function highlightReply(id) {
|
||||
|
||||
function generatePassword() {
|
||||
var pass = '';
|
||||
var chars = '{% endraw %}{{ config.genpassword_chars }}{% raw %}';
|
||||
var chars = '{% endverbatim %}{{ config.genpassword_chars }}{% verbatim %}';
|
||||
for (var i = 0; i < 8; i++) {
|
||||
var rnd = Math.floor(Math.random() * chars.length);
|
||||
pass += chars.substring(rnd, rnd + 1);
|
||||
@ -323,15 +323,15 @@ function rememberStuff() {
|
||||
|
||||
if (sessionStorage.body) {
|
||||
var saved = JSON.parse(sessionStorage.body);
|
||||
if (get_cookie('{% endraw %}{{ config.cookies.js }}{% raw %}')) {
|
||||
if (get_cookie('{% endverbatim %}{{ config.cookies.js }}{% verbatim %}')) {
|
||||
// Remove successful posts
|
||||
var successful = JSON.parse(get_cookie('{% endraw %}{{ config.cookies.js }}{% raw %}'));
|
||||
var successful = JSON.parse(get_cookie('{% endverbatim %}{{ config.cookies.js }}{% verbatim %}'));
|
||||
for (var url in successful) {
|
||||
saved[url] = null;
|
||||
}
|
||||
sessionStorage.body = JSON.stringify(saved);
|
||||
|
||||
document.cookie = '{% endraw %}{{ config.cookies.js }}{% raw %}={};expires=0;path=/;';
|
||||
document.cookie = '{% endverbatim %}{{ config.cookies.js }}{% verbatim %}={};expires=0;path=/;';
|
||||
}
|
||||
if (saved[document.location]) {
|
||||
document.forms.post.body.value = saved[document.location];
|
||||
@ -359,13 +359,13 @@ var script_settings = function(script_name) {
|
||||
function init() {
|
||||
init_stylechooser();
|
||||
|
||||
{% endraw %}
|
||||
{% endverbatim %}
|
||||
{% if config.allow_delete %}
|
||||
if (document.forms.postcontrols) {
|
||||
document.forms.postcontrols.password.value = localStorage.password;
|
||||
}
|
||||
{% endif %}
|
||||
{% raw %}
|
||||
{% verbatim %}
|
||||
|
||||
if (window.location.hash.indexOf('q') != 1 && window.location.hash.substring(1))
|
||||
highlightReply(window.location.hash.substring(1));
|
||||
@ -386,16 +386,16 @@ function ready() {
|
||||
}
|
||||
}
|
||||
|
||||
{% endraw %}
|
||||
{% endverbatim %}
|
||||
|
||||
var post_date = "{{ config.post_date }}";
|
||||
var max_images = {{ config.max_images }};
|
||||
|
||||
onready(init);
|
||||
|
||||
{% if config.google_analytics %}{% raw %}
|
||||
{% if config.google_analytics %}{% verbatim %}
|
||||
|
||||
var _gaq = _gaq || [];_gaq.push(['_setAccount', '{% endraw %}{{ config.google_analytics }}{% raw %}']);{% endraw %}{% if config.google_analytics_domain %}{% raw %}_gaq.push(['_setDomainName', '{% endraw %}{{ config.google_analytics_domain }}{% raw %}']){% endraw %}{% endif %}{% if not config.google_analytics_domain %}{% raw %}_gaq.push(['_setDomainName', 'none']){% endraw %}{% endif %}{% raw %};_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();{% endraw %}{% endif %}
|
||||
var _gaq = _gaq || [];_gaq.push(['_setAccount', '{% endverbatim %}{{ config.google_analytics }}{% verbatim %}']);{% endverbatim %}{% if config.google_analytics_domain %}{% verbatim %}_gaq.push(['_setDomainName', '{% endverbatim %}{{ config.google_analytics_domain }}{% verbatim %}']){% endverbatim %}{% endif %}{% if not config.google_analytics_domain %}{% verbatim %}_gaq.push(['_setDomainName', 'none']){% endverbatim %}{% endif %}{% verbatim %};_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();{% endverbatim %}{% endif %}
|
||||
|
||||
{% if config.statcounter_project and config.statcounter_security %}
|
||||
var sc = document.createElement('script');
|
||||
|
@ -191,6 +191,6 @@
|
||||
<input type="hidden" name="hash" value="{{ antibot.hash() }}">
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">{% raw %}
|
||||
<script type="text/javascript">{% verbatim %}
|
||||
rememberStuff();
|
||||
{% endraw %}</script>
|
||||
{% endverbatim %}</script>
|
||||
|
@ -78,17 +78,17 @@
|
||||
<br>Tinyboard Copyright © 2010-2014 Tinyboard Development Group
|
||||
<br><a href="https://engine.vichan.net/">vichan</a> Copyright © 2012-2018 vichan-devel</p>
|
||||
</footer>
|
||||
<script type="text/javascript">{% raw %}
|
||||
<script type="text/javascript">{% verbatim %}
|
||||
var styles = {
|
||||
{% endraw %}
|
||||
{% for name, uri in config.stylesheets %}{% raw %}'{% endraw %}{{ name|addslashes }}{% raw %}' : '{% endraw %}/stylesheets/{{ uri|addslashes }}{% raw %}',
|
||||
{% endraw %}{% endfor %}{% raw %}
|
||||
{% endverbatim %}
|
||||
{% for name, uri in config.stylesheets %}{% verbatim %}'{% endverbatim %}{{ name|addslashes }}{% verbatim %}' : '{% endverbatim %}/stylesheets/{{ uri|addslashes }}{% verbatim %}',
|
||||
{% endverbatim %}{% endfor %}{% verbatim %}
|
||||
}; onready(init);
|
||||
{% endraw %}</script>
|
||||
{% endverbatim %}</script>
|
||||
|
||||
<script type="text/javascript">{% raw %}
|
||||
<script type="text/javascript">{% verbatim %}
|
||||
ready();
|
||||
{% endraw %}</script>
|
||||
{% endverbatim %}</script>
|
||||
</body>
|
||||
</html>
|
||||
{% endfilter %}
|
||||
|
@ -89,8 +89,8 @@
|
||||
<br><a href="https://engine.vichan.net/">vichan</a> Copyright © 2012-2018 vichan-devel</p>
|
||||
{% for footer in config.footer %}<p class="unimportant" style="text-align:center;">{{ footer }}</p>{% endfor %}
|
||||
</footer>
|
||||
<script type="text/javascript">{% raw %}
|
||||
<script type="text/javascript">{% verbatim %}
|
||||
ready();
|
||||
{% endraw %}</script>
|
||||
{% endverbatim %}</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user