HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Using VanillaStats with the DeferJs option

This discussion is related to the Consolidate addon.
BleistivtBleistivt MVP
edited August 2014 in Feedback

Continuing my other thread...

So this is more of an issue with vanillastats as it inserts javascript into the page body:
https://github.com/vanilla/vanilla/blob/master/plugins/VanillaStats/views/dashboard.php#L38

What I did is this:

if (
    && ($Sender->SelfUrl == 'dashboard/settings' || $Sender->SelfUrl == 'settings')
    && C('EnabledPlugins.VanillaStats')
) {
    SaveToConfig('Plugins.Consolidate.DeferJs', false, array('Save' => false));
}

so js will not be deferred to the bottom on the dashboard main page.
This can be put into Base_Render_Before, for example.

By the way, this plugin is great. Garden.CombineAssets never really worked on my setup, but this does.

Comments

Sign In or Register to comment.