Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

网站设置添加自定义代码 #128

Open
Rockney99 opened this issue Oct 2, 2024 · 2 comments
Open

网站设置添加自定义代码 #128

Rockney99 opened this issue Oct 2, 2024 · 2 comments

Comments

@Rockney99
Copy link

Rockney99 commented Oct 2, 2024

网上看到个翻译功能 想在主题里配置一下 没有地方填自定义代码,代码放下面有没有大佬能适配

自定义CSS代码:
.ignore:hover{color:var(--theme-color);transition:color .2s,transform .3s;}#translate {display:none;}

自定义javascript代码
translate.setAutoDiscriminateLocalLanguage();
translate.language.setLocal('chinese_simplified');
translate.service.use('client.edge');
function executeTranslation() {
translate.execute();
}
executeTranslation();
$(document).ajaxComplete(function() {
executeTranslation();
});

自定义头部HTML

<script src="上传的目录/translate.min.js"></script>

翻译js.zip

functions.zip

@xiaolaodi122
Copy link

搞好了吗这东西小功能也要钱

@Rockney99
Copy link
Author

Rockney99 commented Dec 21, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants