Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kanasimi committed Dec 12, 2023
1 parent 1adc8e5 commit 632c077
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions wiki configuration.sample.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ login_options_for_project.zhmoegirl = {
// 移動端網址的防火牆允許的單位時間內請求數較多,故使用mzh.moegirl.org.cn運行機器人能夠降低撞上防火牆的機率。
API_URL : 'https://mzh.moegirl.org.cn/api.php',
site_name : 'zhmoegirl',
user_agent : 'customized user agent',
user_name : 'Main account name@bot name',
// 設定頁面與記錄頁面所參考的使用者名稱。 @see "wiki loader.js"
// user_name_referenced : '',
Expand Down
4 changes: 4 additions & 0 deletions wiki loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ function login_options_of_API_URL(API_URL) {
// console.trace(login_options);
}

if (login_options.user_agent) {
CeL.get_URL.default_user_agent = login_options.user_agent;
}

return login_options;
}

Expand Down

0 comments on commit 632c077

Please sign in to comment.