-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #227: Conditionnaly include highlight JS
We used to rely on Stacks.js to include and configure highlight.js for syntax highlighting everywhere. Now that we have the information about whether a site uses highlighing or not, we conditionnaly include highlight.js (and its CSS) - we removed all stacks.js related files and code - add a .s-code-block class to all <pre><code> to trigger SE CSS
- Loading branch information
Showing
4 changed files
with
23 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,14 +11,6 @@ | |
"static/css/stacks.css", | ||
"https://cdn.sstatic.net/Shared/stacks.css?v=ca5319e49c63", | ||
), | ||
( | ||
"static/js/stacks.min.js", | ||
"https://unpkg.com/@stackoverflow/[email protected]/dist/js/stacks.min.js", | ||
), | ||
( | ||
"static/js/polyfill.min.js", | ||
"https://polyfill.io/v3/polyfill.min.js?features=es6", | ||
), | ||
( | ||
"static/js/tex-mml-chtml.js", | ||
"https://cdn.jsdelivr.net/npm/[email protected]/es5/tex-mml-chtml.js", | ||
|
@@ -27,28 +19,20 @@ | |
"static/js/stack-icons.js", | ||
"https://unpkg.com/@stackoverflow/[email protected]/build/index.js", | ||
), | ||
("static/js/stub.en.js", "https://cdn.sstatic.net/Js/stub.en.js?v=784a450186a7"), | ||
( | ||
"static/js/jquery.min.js", | ||
"https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js", | ||
), | ||
("static/js/moment.min.js", "https://momentjs.com/downloads/moment.min.js"), | ||
( | ||
"static/js/jdenticon.min.js", | ||
"https://raw.githubusercontent.com/dmester/jdenticon/3.1.0" | ||
"/dist/jdenticon.min.js", | ||
), | ||
( | ||
"static/js/highlightjs-loader.en.js", | ||
"https://cdn.sstatic.net/Js/highlightjs-loader.en.js?v=17552072fdc0", | ||
), | ||
( | ||
"static/js/full-anon.en.js", | ||
"https://cdn.sstatic.net/Js/full-anon.en.js", | ||
"static/css/highight.default.min.css", | ||
"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.1.0/styles/" | ||
"default.min.css", | ||
), | ||
( | ||
"static/js/mobile.en.js", | ||
"https://cdn.sstatic.net/Js/mobile.en.js", | ||
"static/js/highlight.min.js", | ||
"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.1.0/highlight.min.js", | ||
), | ||
# WepP Hero polyfill | ||
( | ||
|
@@ -64,7 +48,7 @@ | |
"https://gist.githubusercontent.com/rgaudin/60bb9cc6f187add506584258028b8ee1/" | ||
"raw/9d575b8e25d67eed2a9c9a91d3e053a0062d2fc7/web-handler.js", | ||
), | ||
# external icon from WP | ||
# external icon from Wikipedia | ||
( | ||
"static/img/external-link-ltr-icon.svg", | ||
"https://fr.wikipedia.org/w/skins/Vector/" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters