+ Reply to Thread
Results 1 to 3 of 3

Thread: Can you add {strip}{/strip} to js_config.tpl

  1. #1
    Senior Member
    Join Date
    Dec 2023
    Posts
    161

    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.

  2. #2
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,174
    {strip} tag is used for html code, not for js

  3. #3
    Senior Member
    Join Date
    Dec 2023
    Posts
    161
    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.

+ Reply to Thread