|
Rank: Member
Groups: Registered
Joined: 1/29/2016 Posts: 10
|
Hi, I'm not sure where the best place to make a feature request is, so I'll add it here.
It would be great to have some sort of javascript customization tool to cut down the file size by removing features not in use, as Bootstrap does. For example, I don't use previews, locations, security groups, autocomplete, etc. I could probably reduce the javascript size by quite a bit without code related to those. I do already minimize the file, which trims about 40%, but it's still larger than I'd like. I can make some changes myself, but that makes later upgrades more difficult.
If you do have advice for trimming unused features, that would be great too.
Thanks!
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Hi, I'll record it as a feature request. You can save about 63KB by removing jQuery from our script, assuming you're referencing jQuery anyway. It should be the first block, from (function () { var _KSQ = .... to ......br) : 0); }; }); })(); you'll also need to call KSQ = $; Before our script is loaded. If other people would like this facility it would be great if they would post here. Thanks Jim -your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 1/29/2016 Posts: 10
|
Great, thanks! I thought that might be removable, but was concerned that your code might be referencing customizations in it. Is that not the case?
Have you tested the rest of the code with newer versions of jquery? It appears to be using 1.2.6, but I'm using 1.10.2.
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Sorry I meant to write this too, you'll need to call KSQ = $; Before our script is loaded. The only change we made was to the variable name ($), we rely on it being called KSQ to prevent collisions with external jQuery imports. Sorry no we had no reason to test it against other versions so that hasn't been done, however my feeling would be that it will be fine - of course you'd need to verify that. Jim PS the only reason we used 1.2 was because it was smaller than newer versions. -your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 2/18/2016 Posts: 11
|
Voting up. I'd like that feature! Thx
|
|
Rank: Member
Groups: Registered
Joined: 1/29/2016 Posts: 10
|
FYI, I snipped out the built-in jQuery and relied on my existing 1.10.2 and it almost works. It fails in SearchUnit.js at line 1002 where it makes this call: Code:if(!sheet){ var style=KSQ(document.createElement("style")) .attr(options) .appendTo("head")[0]; ... Newer jQuery throws an exception processing the "options" parameter. I'll survive with the extra bloat for now. Thanks!
|
|