Opened 9 years ago
Closed 9 years ago
#38461 closed enhancement (invalid)
Don't load svg-painter.js on every admin screen
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 3.8 |
| Component: | Administration | Keywords: | has-patch close |
| Focuses: | administration, performance | Cc: |
Description
svg-painter.js gets loaded on every admin screen, but only user-profile.js uses it (on the user profile editing screen).
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Isn't
user-profile.jsjust re-initializing the painter on color scheme changes?Otherwise the script is always initializing itself if the current browser doesn't support SVG:
$(document).ready( function() { // detection for browser SVG capability if ( document.implementation.hasFeature( 'http://www.w3.org/TR/SVG11/feature#Image', '1.1' ) ) { $( document.body ).removeClass( 'no-svg' ).addClass( 'svg' ); wp.svgPainter.init(); } });