WPIntell

Source evidence

Dequeue scripts on pages not using player

mb.miniAudioPlayer – an HTML5 audio player for your mp3 files · support · 2020-02-29T17:57:00+00:00

complaintsentiment
highseverity
0.97relevance
0replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

5 / 34 rows with source links

14.7% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

29 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
colinfroggatt unresolved
Hi. I am trying to remove the mb audioplayer assets from pages that don’t use it to improve page performance. I am trying to using “Asset Cleanup” plugin to do that but it breaks the page with JS Console errors. The page link added to this Q is for a page that is broken, then rest of the site loads all MBA assets as normal. When I stop the mba assets loading on a page, this causes JS errors and my sticky header/search box stops working. The assets I stop loading are: map_overwrite_default_me /wp-content/plugins/wp-miniaudioplayer/js/map_overwrite_default_me.js mb.miniAudioPlayer /wp-content/plugins/wp-miniaudioplayer/js/jquery.mb.miniAudioPlayer.min.js mb.miniAudioPlayer.css /wp-content/plugins/wp-miniaudioplayer/css/miniplayer.css This causes the following Console errors in Firefox: ReferenceError: replaceDefault is not defined harp-making:730:32 <anonymous> https://dev.handsonharps.com/harp-making/:730 TypeError: jQuery(...).not(...).not(...).mb_miniPlayer is not a function harp-making:722:102 initializeMiniAudioPlayer https://dev.handsonharps.com/harp-making/:722 <anonymous> https://dev.handsonharps.com/harp-making/:732 i https://dev.handsonharps.com/wp-content/cache/asset-cleanup/js/logged-in/head-f1b076388454c99e737f8a0910e7ed0362068d07-1.js:3 fireWith https://dev.handsonharps.com/wp-content/cache/asset-cleanup/js/logged-in/head-f1b076388454c99e737f8a0910e7ed0362068d07-1.js:3 ready https://dev.handsonharps.com/wp-content/cache/asset-cleanup/js/logged-in/head-f1b076388454c99e737f8a0910e7ed0362068d07-1.js:3 J https://dev.handsonharps.com/wp-content/cache/asset-cleanup/js/logged-in/head-f1b076388454c99e737f8a0910e7ed0362068d07-1.js:3 I have tried to dequeue the assets using the following in child theme functions.php but seems not to do anything. add_action('wp_print_scripts', function () { wp_dequeue_script( 'map_overwrite_default_me ' ); wp_dequeue_script( 'mb.miniAudioPlayer' ); }); add_action( 'wp_enqueue_scripts', 'xxxxxx', 99 ); function xxxxxx() { wp_dequeue_script( 'map_overwrite_default_me ' ); wp_dequeue_script( 'mb.miniAudioPlayer' ); } I have unloaded several other plugins such as the Revolution Slider on home page without a hitch. Any help with this much appreciated. P.S. I did make a donation when I started using this plugin a year or so ago as I was so impressed with it 🙂 -Colin WP 5.3.2 MBA 1.9.3 Asset Cleanup : 1.3.5.7 Total Theme: 4.9.6 This topic was modified 6 years, 3 months ago by colinfroggatt . The page I need help with: [ log in to see the link]

Comments

0 shown

No comments were stored for this source.