mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-25 01:20:30 +00:00
Fix switching language should not make the lang attribute empty (#8831)
* Fix switching language should not make the lang attribute empty * Use name field
This commit is contained in:
parent
e8a23e9bcc
commit
49a33ae467
@ -88,6 +88,7 @@ exports.startup = function() {
|
|||||||
if($tw.browser) {
|
if($tw.browser) {
|
||||||
var pluginTiddler = $tw.wiki.getTiddler(plugins[0]);
|
var pluginTiddler = $tw.wiki.getTiddler(plugins[0]);
|
||||||
if(pluginTiddler) {
|
if(pluginTiddler) {
|
||||||
|
document.documentElement.setAttribute("lang",pluginTiddler.getFieldString("name"));
|
||||||
document.documentElement.setAttribute("dir",pluginTiddler.getFieldString("text-direction") || "auto");
|
document.documentElement.setAttribute("dir",pluginTiddler.getFieldString("text-direction") || "auto");
|
||||||
} else {
|
} else {
|
||||||
document.documentElement.removeAttribute("dir");
|
document.documentElement.removeAttribute("dir");
|
||||||
|
Loading…
Reference in New Issue
Block a user