Skip to content

Commit

Permalink
👽️ 因應動畫瘋網站變更調整
Browse files Browse the repository at this point in the history
原本的解析度按鈕 id 屬性消失
變成使用 class
所以奶油刀 trigger 沒有被初始化
  • Loading branch information
hms5232 committed Mar 15, 2024
1 parent b34ae5f commit 9ca0bf5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/butterKnife.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

// 插入按鈕
try {
let resolutionBtn = document.getElementById("resButton"); // 右邊調整解析度的按鈕
let resolutionBtn = document.getElementsByClassName("vjs-res-button")[0]; // 右邊調整解析度的按鈕
let newBtn = document.createElement('button');
newBtn.setAttribute("id", "butter-knife-btn");
newBtn.setAttribute("title", "奶油刀截圖 (F8)");
Expand Down Expand Up @@ -227,8 +227,8 @@
}

// 等解析度按鈕出現,代表開始播放正片
waitForElm('#resButton').then((elm) => {
consolog('resButton is ready');
waitForElm('.vjs-res-button').then((elm) => {
consolog('class vjs-res-button (origin: id resButton) is ready');
// 設定觸發
initTrigger();
});
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "巴哈動畫瘋奶油刀",
"version": "1.0.0",
"version": "1.1.0",
"author": "hms5232",

"description": "A screenshot tool for ani.gamer.com.tw",
Expand Down

0 comments on commit 9ca0bf5

Please sign in to comment.