27 lines
1.0 KiB
JavaScript
27 lines
1.0 KiB
JavaScript
var uwuzuExt = {
|
|
addLogoutLeftBox:function() { // 過去バージョンのuwuzuの仕様復元
|
|
var lmenu = document.querySelector(".userleftbox")
|
|
var logoutBtn = document.createElement("a")
|
|
lmenu.appendChild(document.createElement("hr"))
|
|
logoutBtn.classList.add("leftbutton")
|
|
logoutBtn.innerHTML = "ログアウト"
|
|
logoutBtn.href = "/logout/"
|
|
lmenu.appendChild(logoutBtn)
|
|
},
|
|
searchBoxInspect:function(){ // 検索ボックスのプレースホルダの変更
|
|
if (location.pathname == "search") {
|
|
document.querySelector("#ueusetext").placeholder="ユーズ/ユーザー検索"
|
|
}
|
|
},
|
|
changeMainColor:function(color) {
|
|
document.querySelector(':root').style.setProperty("--main-color",color)
|
|
},
|
|
init:function() { // 多重実行ダメ、絶対。
|
|
uwuzuExt.addLogoutLeftBox()
|
|
uwuzuExt.searchBoxInspect()
|
|
},
|
|
dbgStateMsg:document.createElement("p"),
|
|
extName:"A extension for uwuzu",
|
|
author:"k_yuzen",
|
|
version:"1.0.0-b"
|
|
} |