소스 검색

refresh brower action title less often

Gildas 7 년 전
부모
커밋
9a30330e24
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      extension/ui/bg/ui.js

+ 2 - 2
extension/ui/bg/ui.js

@@ -150,11 +150,11 @@ singlefile.ui = (() => {
 
 	function onTabProgress(tabId, index, maxIndex) {
 		const tabData = tabs[tabId];
-		const progress = Math.max(Math.min(100, Math.floor((index / maxIndex) * 100)), 0);
+		const progress = Math.max(Math.min(20, Math.floor((index / maxIndex) * 20)), 0);
 		if (tabData.progress != progress) {
 			tabData.progress = progress;
 			tabData.text = "";
-			tabData.title = "progress: " + Math.min(100, Math.floor((index / maxIndex) * 100)) + "%";
+			tabData.title = "progress: " + (progress * 5) + "%";
 			tabData.color = [4, 229, 36, 255];
 			const barProgress = Math.floor((index / maxIndex) * 15);
 			if (tabData.barProgress != barProgress) {