51,7 → 51,7 |
this[p] = initObj[p]; |
} |
} |
$(document).ready(function() { shLoader.load(); }); |
jQuery(document).ready(function() { shLoader.load(); }); |
}, // }}} // init() |
/** {{{ // load() Actually load SyntaxHighlighter, if required |
* Only if some code block is found it will be loaded. |
73,10 → 73,10 |
} |
|
// Load the CSS |
$('<link rel="stylesheet" href="'+cssPath+'/shCore.css" type="text/css">').appendTo($('head')); |
$('<link rel="stylesheet" href="'+cssPath+'/shTheme'+this.theme+'.css" type="text/css">').appendTo($('head')); |
jQuery('<link rel="stylesheet" href="'+cssPath+'/shCore.css" type="text/css">').appendTo(jQuery('head')); |
jQuery('<link rel="stylesheet" href="'+cssPath+'/shTheme'+this.theme+'.css" type="text/css">').appendTo(jQuery('head')); |
// Load sh Core |
$.ajax({ // Like jQuery.getScript() but in synchronous mode |
jQuery.ajax({ // Like jQuery.getScript() but in synchronous mode |
url: jsPath+'/shCore.js', |
dataType: 'script', |
async: false, // If loaded asynchronously sh fails. Why? No clue. |
89,8 → 89,8 |
return; |
} |
|
$(shLoader.loadURLs).each(function (i,e) { |
$.ajax({ |
jQuery(shLoader.loadURLs).each(function (i,e) { |
jQuery.ajax({ |
url: e, |
dataType: 'script', |
async: false, |
129,9 → 129,9 |
detectLanguages: function() { // {{{ // Find any language used in the page |
var detected = []; |
var re = /brush: ?(\w+)/i; |
//$('.brush\\:') would not match stuff like 'brush:css' (but it will match 'brush: css') |
$('[class^=brush:]').each(function() { |
var cn = $(this).attr('class'); |
//jQuery('.brush\\:') would not match stuff like 'brush:css' (but it will match 'brush: css') |
jQuery('[class^=brush:]').each(function() { |
var cn = jQuery(this).attr('class'); |
var lang = cn.match(re)[1]; |
shLoader.reqLoad(lang); |
}); |