aaranxu / adidoks

AdiDoks is a mordern documentation theme, which is a port of the Hugo theme Doks for Zola.
https://adidoks.org
MIT License
220 stars 80 forks source link

Fix: JavaScript stopped working on many browsers #40

Closed jordwest closed 2 years ago

jordwest commented 2 years ago

"javascript" isn't a valid value for the script tag's type attribute, so many browsers (tested on Firefox 96 and Chrome 97) will refuse to run it.

For me that meant the search and the dark/light button didn't work.

The fix is just to change "javascript" to "text/javascript":

https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#javascript_types

cc @ziyouwa

ziyouwa commented 2 years ago

"javascript" isn't a valid value for the script tag's type attribute, so many browsers (tested on Firefox 96 and Chrome 97) will refuse to run it.

For me that meant the search and the dark/light button didn't work.

The fix is just to change "javascript" to "text/javascript":

https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#javascript_types

cc @ziyouwa

可能是我git push或者提交pull request搞错了,非常抱歉。我自己的commit是对的,没弄明白怎么回事。

aaranxu commented 2 years ago

Thanks!