Title: [Plugin: SyntaxHighlighter Evolved] [Feature Request] on-demand javascript incl
Last modified: August 19, 2016

---

# [Plugin: SyntaxHighlighter Evolved] [Feature Request] on-demand javascript incl

 *  [Volly](https://wordpress.org/support/users/volly/)
 * (@volly)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-syntaxhighlighter-evolved-feature-request-on-demand-javascript-incl/)
 * Hi,
    i looked at the code and i think there is the possibility to improve the
   load-behavior of the scripts. The adding of scripts is momentary done in the 
   constructor of SyntaxHighlighter. If its done in (i think) “shortcode_callback”
   it should only loads on the sites that really use the syntaxhighlighting feature.
 * It also would be nice to have an option to choose the brushes that are really
   needed (i for myself only use the php-brush).
 * I know, so many wishes and so less time ;-). If you need any help, feel free 
   to ask.
 * [http://wordpress.org/extend/plugins/syntaxhighlighter/](http://wordpress.org/extend/plugins/syntaxhighlighter/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-syntaxhighlighter-evolved-feature-request-on-demand-javascript-incl/#post-1808622)
 * If you take a look at the HTML source of your site, you’ll find my plugin already
   does this. 😉
 * `wp_register_script()` is not the same thing as `wp_enqueue_script()`. The register
   one only declares it’s existence, it does not queue it up for outputting.
 * The shortcode callback logs which languages are used into an internal variable
   and then a function hooked into the footer if your site outputs any needed Javascript
   files based on the content of that internal variable.
 *  Thread Starter [Volly](https://wordpress.org/support/users/volly/)
 * (@volly)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-syntaxhighlighter-evolved-feature-request-on-demand-javascript-incl/#post-1808631)
 * Thanks for the response,
    seems i skipped that while reading the code.
 * In my theme the code is included on all sites – but the plugin proplably working
   correct. I load the last blog-posts in an footerarea and even the code is not
   rendered, i think the shortcode will be applied.
 *  Plugin Contributor [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-syntaxhighlighter-evolved-feature-request-on-demand-javascript-incl/#post-1808662)
 * As long as the shortcode filter runs, the JS/CSS will get outputted. My plugin
   can’t know that you don’t end up displaying it. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: SyntaxHighlighter Evolved] [Feature Request] on-demand javascript
incl’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/syntaxhighlighter_ffffff.svg)
 * [SyntaxHighlighter Evolved](https://wordpress.org/plugins/syntaxhighlighter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/syntaxhighlighter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/syntaxhighlighter/)
 * [Active Topics](https://wordpress.org/support/plugin/syntaxhighlighter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/syntaxhighlighter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/syntaxhighlighter/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-syntaxhighlighter-evolved-feature-request-on-demand-javascript-incl/#post-1808662)
 * Status: not resolved