Skip to content

Commit

Permalink
添加对v12.76.0版本的默认UI支持
Browse files Browse the repository at this point in the history
  • Loading branch information
ybw2016v committed Apr 14, 2021
1 parent dc75281 commit 99767c5
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
console.log('Misskey Translate Script');
ApiUrl = 'https://api.dogcraft.top/ts/';
console.log('Misskey Translate Script v1.2');
ApiUrl = 'https://test1-api.dogcraft.top/ts/';

var cat = localStorage.getItem('lang');
if (cat == null) {
Expand Down Expand Up @@ -114,7 +114,14 @@ window.onload = function () {
var dogui = localStorage.getItem('ui');
var observer = new MutationObserver(callback);
var sl = document.getElementsByClassName('article');
var ar = (dogui=='chat')?document.getElementsByClassName("main")[0]:document.getElementsByClassName("content")[0];
if (dogui=='chat') {
var ar = document.getElementsByClassName("main")[0];
} else if(dogui=='pope') {
var ar = document.getElementsByClassName("content")[0];
}
else{
var ar = document.getElementsByClassName("main")[0];
}
observer.observe(ar, config);
for (let si = 0; si < sl.length; si++) {
const sl_dog = sl[si];
Expand Down

0 comments on commit 99767c5

Please sign in to comment.