Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted October 13, 200618 yr I mostly use script.aculo.us for my projects that go within IPB.But the only problem that I see whenever I try to fix IPB's js to work with script.aculo.us is the way IPB use for() functionSomehow if I turn all the:for(var i in ips_xxx) to for(var i=0; i < ips_xxx.length;i++) AND typeof to using typeof with brackets: typeof(xx)makes most of script.aculo.us work.why not use for() completely and use typeof with brackets?I think that quite a lot of people would be interested in using script.aculo.us on their ipb 2.2 board.Basically I am asking that the JS should be well formatted so that other javascript plugins cannot interfere with the IPB jscripts.thanks
October 16, 200618 yr Management why not use for() completely and use typeof with brackets?I'm really resisting the urge to say "Because we don't want to".Obviously, such a facetious response is much less than professional. We don't really want to change a lot of our working JS to enable mods to work with IPB - it really should be the other way around. We have good reason to use the "for( var i in array )" construct as we use JSON to maintain hash tables and hash indexes which would be more complex to use in an index looping format as you suggest.
October 16, 200618 yr I'm really resisting the urge to say "Because we don't want to".Obviously, such a facetious response is much less than professional. We don't really want to change a lot of our working JS to enable mods to work with IPB - it really should be the other way around. We have good reason to use the "for( var i in array )" construct as we use JSON to maintain hash tables and hash indexes which would be more complex to use in an index looping format as you suggest.Ok then I'll just have to live with it.BTW why are most of the js script on one line?thanks
October 16, 200618 yr The Javascript files are compressed so that they are as small as possible when they're downloaded by browsers :)
Archived
This topic is now archived and is closed to further replies.