Closed XinyuWuu closed 1 year ago
highlight.js
chat.js
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.4.0/styles/default.min.css"> --> <link rel="stylesheet" href="default.min.css"> <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.4.0/highlight.min.js"></script> --> <script src="highlight.min.js"></script> <script> const five = document.querySelector('[data-id="five-server"]'); if (five) five.addEventListener("connected",); else window.addEventListener("load", hljs.highlightAll()); </script> </head> <body> <pre> <code class="language-js"> const five = document.querySelector('[data-id="five-server"]'); if (five) five.addEventListener("connected",); else window.addEventListener("load", hljs.highlightAll()); </code> </pre> </body> </html>
module.exports = { browser: "google-chrome --app=http://localhost:5555 --incognito --newwindows", highlight: false, // enable highlight feature injectBody: true, // enable instant update remoteLogs: true, // enable remoteLogs remoteLogs: "yellow", // enable remoteLogs and use the color yellow injectCss: true, // disable injecting css navigate: true, // enable auto-navigation };
Does it work with injectBody: false?
injectBody: false
Yes, it will work with injectBody: false.
I need
highlight.js
to highlight my code but it didn't work with five server. I have the same issue withchat.js
my test code: (download default.min.css and highlight.min.js from cdn)
the preview in chrome with five server:
open the html file without five server:
my config for five server
DevTools output