From b816d0cd5768110a49ac3815dd7ae2ef52765687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Wed, 27 Apr 2016 23:44:06 +0800 Subject: [PATCH] Fixed SyntaxHighlighter sometimes not initiating Removed Penguin/Github --- botanjs/src/Astro/Bootstrap.js | 20 +++++-------- botanjs/src/Astro/Penguin/Github.css | 44 ---------------------------- botanjs/src/Astro/Penguin/Github.js | 8 ----- 3 files changed, 7 insertions(+), 65 deletions(-) delete mode 100644 botanjs/src/Astro/Penguin/Github.css delete mode 100644 botanjs/src/Astro/Penguin/Github.js diff --git a/botanjs/src/Astro/Bootstrap.js b/botanjs/src/Astro/Bootstrap.js index 4e03fed..983a927 100644 --- a/botanjs/src/Astro/Bootstrap.js +++ b/botanjs/src/Astro/Bootstrap.js @@ -12,7 +12,6 @@ var inited = false; var consoleExists = false; - var SyntaxHighlighterExists = false; var CConsole = "Components.Console"; var SyntaxHighlighter = "Libraries.SyntaxHighlighter"; @@ -35,17 +34,6 @@ { infs[i](); } - - if( SyntaxHighlighterExists ) - { - debug.Info( "[SyntaxHighlighter] Initializing" ); - - /** @type {Libraries.SyntaxHighlighter} */ - var synt = __import( SyntaxHighlighter ); - synt.defaults["toolbar"] = false; - synt.defaults["quick-code"] = false; - synt.highlight(); - } }; /*{{{ Class Catching */ @@ -57,7 +45,13 @@ consoleExists = true; break; case SyntaxHighlighter: - SyntaxHighlighterExists = true; + debug.Info( "[SyntaxHighlighter] Initializing" ); + + /** @type {Libraries.SyntaxHighlighter} */ + var synt = __import( SyntaxHighlighter ); + synt.defaults["toolbar"] = false; + synt.defaults["quick-code"] = false; + synt.highlight(); break; } }); diff --git a/botanjs/src/Astro/Penguin/Github.css b/botanjs/src/Astro/Penguin/Github.css deleted file mode 100644 index c025996..0000000 --- a/botanjs/src/Astro/Penguin/Github.css +++ /dev/null @@ -1,44 +0,0 @@ -html { - background-color: #E5E4EE; -} -body { - font-family: custom-sans; - width: 1000px; - margin: 0 auto; -} - -.center { - text-align: center; -} - -.center > * { - display: inline-block; -} - -h1 { - font-size: 2.5em; -} -h2 { - font-size: 2em; -} - -p { - margin: 0.5em 1em; -} - -pre { - background-color: rgba( 0,0,0,0.1); - padding: 0.5em; -} - -.left { - text-align: left; -} - -ul { - padding: 0.25em 2.5em; -} - -div { - padding: 1em; -} diff --git a/botanjs/src/Astro/Penguin/Github.js b/botanjs/src/Astro/Penguin/Github.js deleted file mode 100644 index 627a7b6..0000000 --- a/botanjs/src/Astro/Penguin/Github.js +++ /dev/null @@ -1,8 +0,0 @@ -(function(){ - var ns = __namespace( "Astro.Penguin.Github" ); - - /** @type {Astro.Bootstrap} */ - var Bootstrap = __import( "Astro.Bootstrap" ); - - -})();