-
Notifications
You must be signed in to change notification settings - Fork 0
/
loader.min.js
3 lines (3 loc) · 2.83 KB
/
loader.min.js
1
2
3
((e,d)=>{function r(a,b){let c=d.createElement("script");c.async=m;c.defer=!0;c.onload=b;c.src=t+a+".min.js";u&&(c.nonce=u);d.head.append(c)}function n(){p(d.body)}function p(a){a=a.querySelectorAll("pre>code:not(.hljs)");if(a.length){f&&f.disconnect();for(let c of a){a=c;B();var b=/\blang(?:uage)?-(\w+)/.exec(a.className.toLowerCase());if(b&&!g){g={};for(let h of"1c abnf accesslog actionscript,as ada angelscript,asc apache%conf applescript,osascript arcade arduino arm!asm asciidoc,adoc aspectj autohotkey,ahk autoit avrasm awk axapta,x++ basic bnf brainfuck,bf cal capnp!roto ceylon clean,dcl,icl clojure,clj,edn clojure-repl cmake coffee!script,cson,iced coq cos,cls crm!sh,pcmk cr!ystal csp d dart delphi,dfm,dpr,pas!cal django,jinja dns,bind,zone docker!file dos,bat,cmd dsconfig dts dust,dst ebnf elixir,ex!s elm erb erl!ang erlang-repl excel,xls!x fix flix fortran,f90,f95 fs!harp,f# gams,gms gauss,gss gcode,nc gherkin,feature glsl gml golo gradle graphql,gql groovy haml handlebars,hbs,htmlbars haskell,hs haxe,hx hsp http%s hy%lang inform7,i7 irpf90 isbl jboss-cli,wildfly-cli julia julia-repl,jldoctest kotlin,kt!s lasso%script,ls latex,tex ldif leaf lisp livecodeserver livescript,ls llvm lsl mathematica,mma,wl matlab maxima mel m!ercury,moo mips!asm mizar mojolicious monkey moon!script n1ql nestedtext,nt nginx%conf nim nix%os node-repl nsis ocaml,ml openscad,scad oxygene parser3 pf pgsql,postgres!ql pony powershell,ps!1,pwsh processing,pde profile prolog properties proto!buf puppet,pp purebasic,pb!i q,k!db qml,qt re!asonml rib roboconf,graph,instances routeros,mikrotik rsl ruleslanguage sas scala scheme,scm sci!lab smali smalltalk,st sml,ml sqf sql stan%funcs stata,ado,do step!21,p21,stp styl!us subunit taggerscript tap tcl,tk thrift tp twig,craftcms vala vbs!cript vbscript-html v!erilog,sv!h vhdl vim wasm wren x86asm xl,tao xq!uery,xpath,xqm zep!hir".replace(/(\w+)(?:%|!(\w+))/g,
"$1$2,$1").split(" ")){let v=h.split(",");for(let C of v)g[C]=v[0]}}b=b?g[b[1]]||"":"";w[b]||(w[b]=1,r("languages/"+b,n));e.hljs&&e.hljs.highlightElement(a)}q()}}function B(){if(!m){m=!0;if("none"!==x){let a=d.createElement("link");a.rel="stylesheet";a.href=t+"styles/"+x+".min.css";d.head.append(a)}r("highlight",()=>{y&&e.hljs.configure(JSON.parse(y));n()})}}function q(){if(k){var a=d.querySelector(k);a&&(f||=new MutationObserver(b=>b.forEach(c=>{c.addedNodes.length&&c.addedNodes.forEach(h=>{h instanceof
Element&&p(h)})})),f.observe(a,{childList:!0,subtree:!0}))}}function z(){n();q()}if(!e.hljsLoader){var A=d.currentScript,l=A.dataset,m=!1,g,u=A.nonce,k=l.hljsObserve,f,y=l.hljsOptions,w={"":1},x=l.hljsStyle||"default",t=l.hljsUrl||"https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/";"complete"===d.readyState?z():e.addEventListener("load",z);e.hljsLoader={disconnect:()=>{f&&f.disconnect();k=""},highlightBlocks:p,observe:a=>{k=a;q()}}}})(window,document);