-
February 23, 2024, 10:13 AM
#1
Senior Member
Can you add {strip}{/strip} to js_config.tpl
Is it inadvisable to add strip tags to js_config.tpl for the langauge lines?
It looks so much better with strip added so it doesn't look so huge in the top of the source of the page... first test seemed to work ok, but do some browsers choke on this if they're not one per line?
var lang = new Array();
lang['add_photo'] = 'Add a Picture';lang['photo'] = 'Picture';lang['notice_listing_removed_from_favorites'] = ...
instead of
lang['add_photo'] = 'Add a Picture';
lang['photo'] = 'Picture';
lang['notice_listing_removed_from_favorites'] = ...
Or do these have to remain one per line?
Last edited by Horizon; February 23, 2024 at 10:17 AM.
-
February 23, 2024, 10:56 AM
#2
Flynax developer
{strip} tag is used for html code, not for js
-
February 23, 2024, 11:22 AM
#3
Senior Member
Darn - it seemed to work in firefox and chrome giving it a quick try, but I suppose there are probably browsers where it would break things.
Are the line breaks actually necessary for the javascript variable definition lines that each end with a semicolon, or could I look at another way to remove the line breaks to minify the javascript just a little bit even?
It just looks so long at the top of the source code otherwise... I know I should ignore it, but every time I look at the source it gets me as it looks so long up there.
Wish there were a way to minify it or move it to the bottom of the html instead of the top.
Last edited by Horizon; February 24, 2024 at 01:53 AM.