META-INF.resources.dynamicSourceCodeFetcher.DynamicSourceCodeLoad.min.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jwebmp-dynamic-source-code-viewer Show documentation
Show all versions of jwebmp-dynamic-source-code-viewer Show documentation
The JWebSwing implementation for the Dynamic Source Code Viewer
The newest version!
function updateSourceCodeTheme(b){$("link.prettifyTheme").remove();var a='';$("head").append(a);prettyPrint()}$.fn.dynamicSourceCode=function(a){a=$.extend({},$.fn.dynamicSourceCode.defaults,a);$(this).data("opts",a);updateSourceCodeTheme(a.defaultTheme)};$.fn.dynamicSourceCodeAddChanger=function(b,e){var c=$(this).data("opts");var a=$(this);var d=$("#"+b);d.on("click",function(){var g=$(this).attr("value");var f=c.srcUrl+g+c.fileExtension;$.get(f,function(h){a.html(h);a.removeClass(c.prettyPrintClass);prettyPrint()})})};$.fn.dynamicSourceCodeAddThemeChanger=function(a){var b=$(this).data("opts");var c=$("#"+a);c.on("click",function(){var d=$(this).attr("value");updateSourceCodeTheme(d)})};$.fn.dynamicSourceCode.defaults={srcUrl:"java/",prettyPrintClass:"prettyprinted",defaultTheme:"bower_components/google-code-prettify/bin/prettify.min.css",fileExtension:".java"};