kiến thức Tổng hợp những addon chất cho Firefox / Chromium

Firefox ESR 78.15 bị lỗi mất chỗ nhắn tin trên facebook, giờ còn bản nào nhẹ nhàng nữa k bác, ổ SSD máy nhà hơi cùi, cái khung chat này bị mất này bác
View attachment 1776127
Quan trọng là RAM thôi, bạn có tầm 8GB RAM đổ lên thì bê hết cache lên RAM thì không ảnh hưởng tới SSD nữa.

Các hướng dẫn tối ưu, có cả cho lên RAM: https://voz.vn/t/tong-hop-nhung-addon-chat-cho-firefox-pc-mobile.682181/post-24223961

Hiện tại bản 104 tete009 mình thấy nhẹ nhất, từng lên 111 Firefox thường xong lại xuống vì tete quá ngon: https://drive.google.com/file/d/1bYHpARq45jEToKVecVES7v_hghb60yA6/view?usp=share_link
 
1681372392783.png

Mới thử cái MDM ngon phết, thử tải 1 file 5GB download mặc định lẹt đẹt khoảng vài Mbps còn qua MDM hơn trăm Mbps ăn max tốc độ gói cước luôn phê thật :D . Mà mục bắt link như nào vậy thớt, chỗ spoiler trống trơn không thấy gì.
 
View attachment 1776360
Mới thử cái MDM ngon phết, thử tải 1 file 5GB download mặc định lẹt đẹt khoảng vài Mbps còn qua MDM hơn trăm Mbps ăn max tốc độ gói cước luôn phê thật :D . Mà mục bắt link như nào vậy thớt, chỗ spoiler trống trơn không thấy gì.
Bên trong spoiler là mấy ảnh dùng Imgur dạng Iframe, chắc bạn chặn mất nên không thấy rồi, để mình chuyển qua attachment voz.
 
Trước có bạn hỏi, nhìn chung giải pháp như này: https://voz.vn/t/tong-hop-nhung-addon-chat-cho-firefox-pc-mobile.682181/post-24525109

Addon này nó sẽ không bắt link nếu link không chia luồng được, thật ra Drive chia luồng được cơ mà nó không cho Content-Length header cho những file to để tránh người dùng tải phân luồng tốn bandwidth, cơ mà nó vẫn để lại một cái header x-content-length mà IDM và đồng bọn sử dụng để chia luồng, mình có giải thích qua ở: https://voz.vn/t/tong-hop-nhung-addon-chat-cho-firefox-pc-mobile.682181/post-24531857

Để mình chỉnh lại post giới thiệu thêm lưu ý.
Hình như không phải do content-length đâu bác, bởi vì MDM vẫn lấy được file size, check bằng dev tools thấy response header vẫn trả về content-length.
Em đoán có thể do thiếu accept-range, nhưng không biết làm thế nào để thêm vào, dùng thử header editor ở #1 cũng không được.
Bác có cách nào fix được thì chỉ em với, em vẫn đang mò mà chưa ra.

1681375530621.png
1681375604839.png
 
Hình như không phải do content-length đâu bác, bởi vì MDM vẫn lấy được file size, check bằng dev tools thấy response header vẫn trả về content-length.
Em đoán có thể do thiếu accept-range, nhưng không biết làm thế nào để thêm vào, dùng thử header editor ở #1 cũng không được.
Bác có cách nào fix được thì chỉ em với, em vẫn đang mò mà chưa ra.

View attachment 1776501View attachment 1776504
Đúng là mình test thử chia luồng file trên được, cơ mà file trên chưa phải file cực lớn (tầm 3-4GB) nên chưa test chính xác được, tác giả có nói qua ở đây: https://github.com/jingyu9575/multithreaded-download-manager/issues/19

Mình nghĩ tác giả thêm cứng Google Drive vào ngoại lệ không chia luồng nên chắc phải lập issue trên Github báo cải thiện rồi, bạn thử lập Issue xem sao: https://github.com/jingyu9575/multithreaded-download-manager/issues

Chuẩn rồi đây, Google Drive được thêm cứng vào với cách lấy Range header riêng, cơ mà Google Drive thay đổi nên không còn hoạt động nữa suy ra lý do tại sao không chia luồng được kể cả có Content-Length: https://github.com/jingyu9575/multi...1b668abcacabee/src/background/site-handler.ts

Vì ông tác giả lấy Content-Length từ trang drive.google.com mà dùng để xem thông tin file ấy.

Nếu bạn có một hoặc vài file thật bự để mình test để có nhiều mẫu thì sẽ tốt hơn khi gửi cho tác giả.

Để mình chỉ bạn cách test, ở phần mà bạn lấy được link Google Drive trên, bạn chuột phải vào rồi chọn Resend, thêm một header tên là Range với giá trị là bytes=0- rồi Resend, nếu thấy 206 và Content-Range cho cả file bự nghĩa là chuẩn, gửi mẫu cho tác giả để cải thiện.

ZYsesRw.png


Còn đây là kết quả test file trên khi thêm Range header vào, ra 206 với Content-Range nghĩa là có thể chia luồng được, bạn cứ lấy ví dụ của mình đưa cho tác giả là ông ấy hiểu:

Code:
GET /docs/securesc/uuq7s9io0aigic661od1p0c29dluasjm/6lsqteb8t38ke9a7aqfatvq0ungkf4u1/1681376700000/04238328744718074012/10597165939605172664/1bYHpARq45jEToKVecVES7v_hghb60yA6?e=download&ax=ALy03A7EFQns-V0cX5VZqDAnYnil2jQyA1qAXmwqspjYyFm1B7I6bDFs1ptKNl90pF_1DbM3xvofB2TRHLi4URvyYoXhiYAGiOQeGKorAm43efmfZNBGEQ4gtXLOIR5tiesN1DGoXZr9UO69nP-0XRt6AFP2mJ2pUHye2yoM04CKKoMvDCpGMaT3HLS8Vz7g_EmOaSe7l6HODCUn3-aE4CAX33WR3HfFODdcAiXXMxLhv9ITW7_rT0dRlgnuXupXqMzj-ZRTcsH5olzpDxd9O1i9pJSV7rOkV5bKYK-RoTmQ4d542U1xZ9nziu-3Qb9Byd9ZYwzTRYV6TgBOlysytXL93_gQLnaL0_h4H9qhJUIb-Nb10qrWBlVIJRFVdeo2xG7VISMSrVM4m6XhOgJ38x7bKhExqm6o6KZi0FqgMA6TQfcht_Vk1OTsYGoqIrSf28SNpxKh0zt6chM2PwxxDnvi-CN5bMuF6grHXGm4tXGPa65PmewKVvJr7iCuzC7w67lowEMjkwG9fBRNlsj7E7kfFORZMhAF8lqgg_QP6JwGwZ-IoHucWAfKavL11EoyVKjNwj8t0WCfSDYTkq1PpeGF-yNn4vt5kkVCjg42Kq6rhQDG-lYpC1WU1GXaKEexC_8TSXVoltcOIAqNye1qhmYV-9RMxGqGtloJNGfcUudzeqKIkdVIytNW26KuZkMNuairkAQj5XbBAwwfVh6Hc0oyBEf7oqS5bmCxhGxP1_R82k3ZOjw9cp-rey0EtGhvbhARa5zj2T8XPcvFRucqq6Cl_ys8hvE0liVj6C4GEGINP8zoYk7i3hmzZQXGTTSZdBPNQcECrB68DFiKJ18IajQtd3ntqaiPlKEiVvo_9G_2kFox_vHQPmAdoZpo3kJNVPk&uuid=24c93627-3024-43a4-893b-038a006e3a17&authuser=0&nonce=ol014pd0b6u8m&user=10597165939605172664&hash=u8q2e2hb61fhc0n3mpln5njpv9n0t3bg HTTP/1.1
Host: doc-0c-90-docs.googleusercontent.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Cookie: <REDACTED>
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: cross-site
Sec-Fetch-User: ?1
Range: bytes=0-
Pragma: no-cache
Cache-Control: no-cache

HTTP/1.1 206 Partial Content
Cache-Control: no-store
Pragma: no-cache
X-GUploader-UploadID: ADPycdsgf29q_2VhixnwW6RoP5sJmSUK58SrcSN7Ev9y-Y9qccqC737g4OosrQYI3Xl4uq1AA0yxoqcMrEhrhTwAt7T5nA
Content-Type: application/x-7z-compressed
Content-Disposition: attachment; filename="firefox-104.0.2-2022090215.en-US.win32-tete009-sse2-pgo.7z"; filename*=UTF-8''firefox-104.0.2-2022090215.en-US.win32-tete009-sse2-pgo.7z
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: false
Access-Control-Allow-Headers: Accept, Accept-Language, Authorization, Cache-Control, Content-Disposition, Content-Encoding, Content-Language, Content-Length, Content-MD5, Content-Range, Content-Type, Date, developer-token, financial-institution-id, X-Goog-Sn-Metadata, X-Goog-Sn-PatientId, GData-Version, google-cloud-resource-prefix, linked-customer-id, login-customer-id, x-goog-request-params, Host, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Origin, OriginToken, Pragma, Range, request-id, Slug, Transfer-Encoding, hotrod-board-name, hotrod-chrome-cpu-model, hotrod-chrome-processors, Want-Digest, X-Ad-Manager-Impersonation, x-chrome-connected, X-ClientDetails, X-Client-Version, X-Firebase-Locale, X-Goog-Firebase-Installations-Auth, X-Firebase-Client, X-Firebase-Client-Log-Type, X-Firebase-GMPID, X-Firebase-Auth-Token, X-Firebase-AppCheck, X-Firebase-Token, X-Goog-Drive-Client-Version, X-Goog-Drive-Resource-Keys, X-GData-Client, X-GData-Key, X-GoogApps-Allowed-Domains, X-Goog-AdX-Buyer-Impersonation, X-Goog-Api-Client, X-Goog-Visibilities, X-Goog-AuthUser, x-goog-ext-124712974-jspb, x-goog-ext-467253834-jspb, x-goog-ext-251363160-jspb, x-goog-ext-259736195-jspb, x-goog-ext-477772811-jspb, x-goog-ext-328800237-jspb, X-Goog-PageId, X-Goog-Encode-Response-If-Executable, X-Goog-Correlation-Id, X-Goog-Request-Info, X-Goog-Request-Reason, X-Goog-Request-Time, X-Goog-Experiments, x-goog-iam-authority-selector, x-goog-iam-authorization-token, X-Goog-Spatula, X-Goog-Travel-Bgr, X-Goog-Travel-Settings, X-Goog-Upload-Command, X-Goog-Upload-Content-Disposition, X-Goog-Upload-Content-Length, X-Goog-Upload-Content-Type, X-Goog-Upload-File-Name, X-Goog-Upload-Header-Content-Encoding, X-Goog-Upload-Header-Content-Length, X-Goog-Upload-Header-Content-Type, X-Goog-Upload-Header-Transfer-Encoding, X-Goog-Upload-Offset, X-Goog-Upload-Protocol, x-goog-user-project, X-Goog-Visitor-Id, X-Goog-FieldMask, X-Google-Project-Override, x-goog-maps-api-salt, x-goog-maps-api-signature, x-goog-maps-client-id, X-Goog-Api-Key, X-HTTP-Method-Override, X-JavaScript-User-Agent, X-Pan-Versionid, X-Proxied-User-IP, X-Origin, X-Referer, X-Requested-With, X-Stadia-Client-Context, X-Upload-Content-Length, X-Upload-Content-Type, X-Use-Alt-Service, X-Use-HTTP-Status-Code-Override, X-Ios-Bundle-Identifier, X-Android-Package, X-Ariane-Xsrf-Token, X-YouTube-Bootstrap-Logged-In, X-YouTube-VVT, X-YouTube-Page-CL, X-YouTube-Page-Timestamp, X-Compass-Routing-Destination, x-framework-xsrf-token, X-Goog-Meeting-ABR, X-Goog-Meeting-Botguardid, X-Goog-Meeting-ClientInfo, X-Goog-Meeting-ClientVersion, X-Goog-Meeting-Debugid, X-Goog-Meeting-Identifier, X-Goog-Meeting-Interop-Cohorts, X-Goog-Meeting-Interop-Type, X-Goog-Meeting-RtcClient, X-Goog-Meeting-StartSource, X-Goog-Meeting-Token, X-Goog-Meeting-ViewerInfo, X-Goog-Meeting-Viewer-Token, X-Client-Data, x-sdm-id-token, X-Sfdc-Authorization, MIME-Version, Content-Transfer-Encoding, X-Earth-Engine-App-ID-Token, X-Earth-Engine-Computation-Profile, X-Earth-Engine-Computation-Profiling, X-Play-Console-Experiments-Override, X-Play-Console-Session-Id, x-alkali-account-key, x-alkali-application-key, x-alkali-auth-apps-namespace, x-alkali-auth-entities-namespace, x-alkali-auth-entity, x-alkali-client-locale, EES-S7E-MODE, cast-device-capabilities, X-Server-Timeout, x-foyer-client-environment, x-goog-greenenergyuserappservice-metadata, x-goog-sherlog-context, X-Server-Token
Access-Control-Allow-Methods: GET,HEAD,OPTIONS
Content-Length: 57991476
Content-Range: bytes 0-57991475/57991476
Date: Thu, 13 Apr 2023 09:07:32 GMT
Old-Expires: Thu, 13 Apr 2023 09:07:32 GMT
Old-Cache-Control: private, max-age=0
X-Goog-Hash: crc32c=7cfhZA==
Server: UploadServer
Remote-Ip: 142.250.66.129

Còn đây là khi không dùng Range header, vẫn có Content-Length:
Code:
GET /docs/securesc/uuq7s9io0aigic661od1p0c29dluasjm/6lsqteb8t38ke9a7aqfatvq0ungkf4u1/1681376700000/04238328744718074012/10597165939605172664/1bYHpARq45jEToKVecVES7v_hghb60yA6?e=download&ax=ALy03A7EFQns-V0cX5VZqDAnYnil2jQyA1qAXmwqspjYyFm1B7I6bDFs1ptKNl90pF_1DbM3xvofB2TRHLi4URvyYoXhiYAGiOQeGKorAm43efmfZNBGEQ4gtXLOIR5tiesN1DGoXZr9UO69nP-0XRt6AFP2mJ2pUHye2yoM04CKKoMvDCpGMaT3HLS8Vz7g_EmOaSe7l6HODCUn3-aE4CAX33WR3HfFODdcAiXXMxLhv9ITW7_rT0dRlgnuXupXqMzj-ZRTcsH5olzpDxd9O1i9pJSV7rOkV5bKYK-RoTmQ4d542U1xZ9nziu-3Qb9Byd9ZYwzTRYV6TgBOlysytXL93_gQLnaL0_h4H9qhJUIb-Nb10qrWBlVIJRFVdeo2xG7VISMSrVM4m6XhOgJ38x7bKhExqm6o6KZi0FqgMA6TQfcht_Vk1OTsYGoqIrSf28SNpxKh0zt6chM2PwxxDnvi-CN5bMuF6grHXGm4tXGPa65PmewKVvJr7iCuzC7w67lowEMjkwG9fBRNlsj7E7kfFORZMhAF8lqgg_QP6JwGwZ-IoHucWAfKavL11EoyVKjNwj8t0WCfSDYTkq1PpeGF-yNn4vt5kkVCjg42Kq6rhQDG-lYpC1WU1GXaKEexC_8TSXVoltcOIAqNye1qhmYV-9RMxGqGtloJNGfcUudzeqKIkdVIytNW26KuZkMNuairkAQj5XbBAwwfVh6Hc0oyBEf7oqS5bmCxhGxP1_R82k3ZOjw9cp-rey0EtGhvbhARa5zj2T8XPcvFRucqq6Cl_ys8hvE0liVj6C4GEGINP8zoYk7i3hmzZQXGTTSZdBPNQcECrB68DFiKJ18IajQtd3ntqaiPlKEiVvo_9G_2kFox_vHQPmAdoZpo3kJNVPk&uuid=24c93627-3024-43a4-893b-038a006e3a17&authuser=0&nonce=ol014pd0b6u8m&user=10597165939605172664&hash=u8q2e2hb61fhc0n3mpln5njpv9n0t3bg HTTP/1.1
Host: doc-0c-90-docs.googleusercontent.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Cookie: <REDACTED>
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1

HTTP/1.1 200 OK
Cache-Control: no-store
Pragma: no-cache
X-GUploader-UploadID: ADPycdsBQfJarFtUQSZjys4CiB0t25MRUORS8mMD6USREPd13flFZ3nc9ziRNXa5yS6A4yrEU-adYWSdMl5yGotZbemtRw
Content-Type: application/x-7z-compressed
Content-Disposition: attachment; filename="firefox-104.0.2-2022090215.en-US.win32-tete009-sse2-pgo.7z"; filename*=UTF-8''firefox-104.0.2-2022090215.en-US.win32-tete009-sse2-pgo.7z
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: false
Access-Control-Allow-Headers: Accept, Accept-Language, Authorization, Cache-Control, Content-Disposition, Content-Encoding, Content-Language, Content-Length, Content-MD5, Content-Range, Content-Type, Date, developer-token, financial-institution-id, X-Goog-Sn-Metadata, X-Goog-Sn-PatientId, GData-Version, google-cloud-resource-prefix, linked-customer-id, login-customer-id, x-goog-request-params, Host, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Origin, OriginToken, Pragma, Range, request-id, Slug, Transfer-Encoding, hotrod-board-name, hotrod-chrome-cpu-model, hotrod-chrome-processors, Want-Digest, X-Ad-Manager-Impersonation, x-chrome-connected, X-ClientDetails, X-Client-Version, X-Firebase-Locale, X-Goog-Firebase-Installations-Auth, X-Firebase-Client, X-Firebase-Client-Log-Type, X-Firebase-GMPID, X-Firebase-Auth-Token, X-Firebase-AppCheck, X-Firebase-Token, X-Goog-Drive-Client-Version, X-Goog-Drive-Resource-Keys, X-GData-Client, X-GData-Key, X-GoogApps-Allowed-Domains, X-Goog-AdX-Buyer-Impersonation, X-Goog-Api-Client, X-Goog-Visibilities, X-Goog-AuthUser, x-goog-ext-124712974-jspb, x-goog-ext-467253834-jspb, x-goog-ext-251363160-jspb, x-goog-ext-259736195-jspb, x-goog-ext-477772811-jspb, x-goog-ext-328800237-jspb, X-Goog-PageId, X-Goog-Encode-Response-If-Executable, X-Goog-Correlation-Id, X-Goog-Request-Info, X-Goog-Request-Reason, X-Goog-Request-Time, X-Goog-Experiments, x-goog-iam-authority-selector, x-goog-iam-authorization-token, X-Goog-Spatula, X-Goog-Travel-Bgr, X-Goog-Travel-Settings, X-Goog-Upload-Command, X-Goog-Upload-Content-Disposition, X-Goog-Upload-Content-Length, X-Goog-Upload-Content-Type, X-Goog-Upload-File-Name, X-Goog-Upload-Header-Content-Encoding, X-Goog-Upload-Header-Content-Length, X-Goog-Upload-Header-Content-Type, X-Goog-Upload-Header-Transfer-Encoding, X-Goog-Upload-Offset, X-Goog-Upload-Protocol, x-goog-user-project, X-Goog-Visitor-Id, X-Goog-FieldMask, X-Google-Project-Override, x-goog-maps-api-salt, x-goog-maps-api-signature, x-goog-maps-client-id, X-Goog-Api-Key, X-HTTP-Method-Override, X-JavaScript-User-Agent, X-Pan-Versionid, X-Proxied-User-IP, X-Origin, X-Referer, X-Requested-With, X-Stadia-Client-Context, X-Upload-Content-Length, X-Upload-Content-Type, X-Use-Alt-Service, X-Use-HTTP-Status-Code-Override, X-Ios-Bundle-Identifier, X-Android-Package, X-Ariane-Xsrf-Token, X-YouTube-Bootstrap-Logged-In, X-YouTube-VVT, X-YouTube-Page-CL, X-YouTube-Page-Timestamp, X-Compass-Routing-Destination, x-framework-xsrf-token, X-Goog-Meeting-ABR, X-Goog-Meeting-Botguardid, X-Goog-Meeting-ClientInfo, X-Goog-Meeting-ClientVersion, X-Goog-Meeting-Debugid, X-Goog-Meeting-Identifier, X-Goog-Meeting-Interop-Cohorts, X-Goog-Meeting-Interop-Type, X-Goog-Meeting-RtcClient, X-Goog-Meeting-StartSource, X-Goog-Meeting-Token, X-Goog-Meeting-ViewerInfo, X-Goog-Meeting-Viewer-Token, X-Client-Data, x-sdm-id-token, X-Sfdc-Authorization, MIME-Version, Content-Transfer-Encoding, X-Earth-Engine-App-ID-Token, X-Earth-Engine-Computation-Profile, X-Earth-Engine-Computation-Profiling, X-Play-Console-Experiments-Override, X-Play-Console-Session-Id, x-alkali-account-key, x-alkali-application-key, x-alkali-auth-apps-namespace, x-alkali-auth-entities-namespace, x-alkali-auth-entity, x-alkali-client-locale, EES-S7E-MODE, cast-device-capabilities, X-Server-Timeout, x-foyer-client-environment, x-goog-greenenergyuserappservice-metadata, x-goog-sherlog-context, X-Server-Token
Access-Control-Allow-Methods: GET,HEAD,OPTIONS
Content-Length: 57991476
Date: Thu, 13 Apr 2023 09:06:32 GMT
Old-Expires: Thu, 13 Apr 2023 09:06:32 GMT
Old-Cache-Control: private, max-age=0
X-Goog-Hash: crc32c=7cfhZA==
Server: UploadServer
Remote-Ip: 142.250.66.129
 
Hình như không phải do content-length đâu bác, bởi vì MDM vẫn lấy được file size, check bằng dev tools thấy response header vẫn trả về content-length.
Em đoán có thể do thiếu accept-range, nhưng không biết làm thế nào để thêm vào, dùng thử header editor ở #1 cũng không được.
Bác có cách nào fix được thì chỉ em với, em vẫn đang mò mà chưa ra.

View attachment 1776501View attachment 1776504

Edit: Post trên bị moderation approval nên mình post lại post này.

Đúng là mình test thử chia luồng file trên được, cơ mà file trên chưa phải file cực lớn (tầm 3-4GB) nên chưa test chính xác được, tác giả có nói qua ở đây: https://github.com/jingyu9575/multithreaded-download-manager/issues/19

Mình nghĩ tác giả thêm cứng Google Drive vào ngoại lệ không chia luồng nên chắc phải lập issue trên Github báo cải thiện rồi, bạn thử lập Issue xem sao: https://github.com/jingyu9575/multithreaded-download-manager/issues

Vì ông tác giả lấy Content-Length từ trang drive.google.com mà dùng để xem thông tin file ấy, hiện tại Google đổi code nên không lấy được => tải mà không chia luồng được, tác giả lại quên không kiểm tra Content-Length mà lý ra kiểm tra là chia được.

Nếu bạn có một hoặc vài file thật bự để mình test để có nhiều mẫu thì sẽ tốt hơn khi gửi cho tác giả.

Để mình chỉ bạn cách test, ở phần mà bạn lấy được link Google Drive trên, bạn chuột phải vào rồi chọn Resend, thêm một header tên là Range với giá trị là bytes=0- rồi Resend, nếu thấy 206 và Content-Range cho cả file bự nghĩa là chuẩn, gửi mẫu cho tác giả để cải thiện.

ZYsesRw.png


Còn đây là kết quả test file trên khi thêm Range header vào, ra 206 với Content-Range nghĩa là có thể chia luồng được, bạn cứ lấy ví dụ của mình đưa cho tác giả là ông ấy hiểu:

Code:
GET /docs/securesc/uuq7s9io0aigic661od1p0c29dluasjm/6lsqteb8t38ke9a7aqfatvq0ungkf4u1/1681376700000/04238328744718074012/10597165939605172664/1bYHpARq45jEToKVecVES7v_hghb60yA6?e=download&ax=ALy03A7EFQns-V0cX5VZqDAnYnil2jQyA1qAXmwqspjYyFm1B7I6bDFs1ptKNl90pF_1DbM3xvofB2TRHLi4URvyYoXhiYAGiOQeGKorAm43efmfZNBGEQ4gtXLOIR5tiesN1DGoXZr9UO69nP-0XRt6AFP2mJ2pUHye2yoM04CKKoMvDCpGMaT3HLS8Vz7g_EmOaSe7l6HODCUn3-aE4CAX33WR3HfFODdcAiXXMxLhv9ITW7_rT0dRlgnuXupXqMzj-ZRTcsH5olzpDxd9O1i9pJSV7rOkV5bKYK-RoTmQ4d542U1xZ9nziu-3Qb9Byd9ZYwzTRYV6TgBOlysytXL93_gQLnaL0_h4H9qhJUIb-Nb10qrWBlVIJRFVdeo2xG7VISMSrVM4m6XhOgJ38x7bKhExqm6o6KZi0FqgMA6TQfcht_Vk1OTsYGoqIrSf28SNpxKh0zt6chM2PwxxDnvi-CN5bMuF6grHXGm4tXGPa65PmewKVvJr7iCuzC7w67lowEMjkwG9fBRNlsj7E7kfFORZMhAF8lqgg_QP6JwGwZ-IoHucWAfKavL11EoyVKjNwj8t0WCfSDYTkq1PpeGF-yNn4vt5kkVCjg42Kq6rhQDG-lYpC1WU1GXaKEexC_8TSXVoltcOIAqNye1qhmYV-9RMxGqGtloJNGfcUudzeqKIkdVIytNW26KuZkMNuairkAQj5XbBAwwfVh6Hc0oyBEf7oqS5bmCxhGxP1_R82k3ZOjw9cp-rey0EtGhvbhARa5zj2T8XPcvFRucqq6Cl_ys8hvE0liVj6C4GEGINP8zoYk7i3hmzZQXGTTSZdBPNQcECrB68DFiKJ18IajQtd3ntqaiPlKEiVvo_9G_2kFox_vHQPmAdoZpo3kJNVPk&uuid=24c93627-3024-43a4-893b-038a006e3a17&authuser=0&nonce=ol014pd0b6u8m&user=10597165939605172664&hash=u8q2e2hb61fhc0n3mpln5njpv9n0t3bg HTTP/1.1
Host: doc-0c-90-docs.googleusercontent.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Cookie: <REDACTED>
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: cross-site
Sec-Fetch-User: ?1
Range: bytes=0-
Pragma: no-cache
Cache-Control: no-cache

HTTP/1.1 206 Partial Content
Cache-Control: no-store
Pragma: no-cache
X-GUploader-UploadID: ADPycdsgf29q_2VhixnwW6RoP5sJmSUK58SrcSN7Ev9y-Y9qccqC737g4OosrQYI3Xl4uq1AA0yxoqcMrEhrhTwAt7T5nA
Content-Type: application/x-7z-compressed
Content-Disposition: attachment; filename="firefox-104.0.2-2022090215.en-US.win32-tete009-sse2-pgo.7z"; filename*=UTF-8''firefox-104.0.2-2022090215.en-US.win32-tete009-sse2-pgo.7z
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: false
Access-Control-Allow-Headers: Accept, Accept-Language, Authorization, Cache-Control, Content-Disposition, Content-Encoding, Content-Language, Content-Length, Content-MD5, Content-Range, Content-Type, Date, developer-token, financial-institution-id, X-Goog-Sn-Metadata, X-Goog-Sn-PatientId, GData-Version, google-cloud-resource-prefix, linked-customer-id, login-customer-id, x-goog-request-params, Host, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Origin, OriginToken, Pragma, Range, request-id, Slug, Transfer-Encoding, hotrod-board-name, hotrod-chrome-cpu-model, hotrod-chrome-processors, Want-Digest, X-Ad-Manager-Impersonation, x-chrome-connected, X-ClientDetails, X-Client-Version, X-Firebase-Locale, X-Goog-Firebase-Installations-Auth, X-Firebase-Client, X-Firebase-Client-Log-Type, X-Firebase-GMPID, X-Firebase-Auth-Token, X-Firebase-AppCheck, X-Firebase-Token, X-Goog-Drive-Client-Version, X-Goog-Drive-Resource-Keys, X-GData-Client, X-GData-Key, X-GoogApps-Allowed-Domains, X-Goog-AdX-Buyer-Impersonation, X-Goog-Api-Client, X-Goog-Visibilities, X-Goog-AuthUser, x-goog-ext-124712974-jspb, x-goog-ext-467253834-jspb, x-goog-ext-251363160-jspb, x-goog-ext-259736195-jspb, x-goog-ext-477772811-jspb, x-goog-ext-328800237-jspb, X-Goog-PageId, X-Goog-Encode-Response-If-Executable, X-Goog-Correlation-Id, X-Goog-Request-Info, X-Goog-Request-Reason, X-Goog-Request-Time, X-Goog-Experiments, x-goog-iam-authority-selector, x-goog-iam-authorization-token, X-Goog-Spatula, X-Goog-Travel-Bgr, X-Goog-Travel-Settings, X-Goog-Upload-Command, X-Goog-Upload-Content-Disposition, X-Goog-Upload-Content-Length, X-Goog-Upload-Content-Type, X-Goog-Upload-File-Name, X-Goog-Upload-Header-Content-Encoding, X-Goog-Upload-Header-Content-Length, X-Goog-Upload-Header-Content-Type, X-Goog-Upload-Header-Transfer-Encoding, X-Goog-Upload-Offset, X-Goog-Upload-Protocol, x-goog-user-project, X-Goog-Visitor-Id, X-Goog-FieldMask, X-Google-Project-Override, x-goog-maps-api-salt, x-goog-maps-api-signature, x-goog-maps-client-id, X-Goog-Api-Key, X-HTTP-Method-Override, X-JavaScript-User-Agent, X-Pan-Versionid, X-Proxied-User-IP, X-Origin, X-Referer, X-Requested-With, X-Stadia-Client-Context, X-Upload-Content-Length, X-Upload-Content-Type, X-Use-Alt-Service, X-Use-HTTP-Status-Code-Override, X-Ios-Bundle-Identifier, X-Android-Package, X-Ariane-Xsrf-Token, X-YouTube-Bootstrap-Logged-In, X-YouTube-VVT, X-YouTube-Page-CL, X-YouTube-Page-Timestamp, X-Compass-Routing-Destination, x-framework-xsrf-token, X-Goog-Meeting-ABR, X-Goog-Meeting-Botguardid, X-Goog-Meeting-ClientInfo, X-Goog-Meeting-ClientVersion, X-Goog-Meeting-Debugid, X-Goog-Meeting-Identifier, X-Goog-Meeting-Interop-Cohorts, X-Goog-Meeting-Interop-Type, X-Goog-Meeting-RtcClient, X-Goog-Meeting-StartSource, X-Goog-Meeting-Token, X-Goog-Meeting-ViewerInfo, X-Goog-Meeting-Viewer-Token, X-Client-Data, x-sdm-id-token, X-Sfdc-Authorization, MIME-Version, Content-Transfer-Encoding, X-Earth-Engine-App-ID-Token, X-Earth-Engine-Computation-Profile, X-Earth-Engine-Computation-Profiling, X-Play-Console-Experiments-Override, X-Play-Console-Session-Id, x-alkali-account-key, x-alkali-application-key, x-alkali-auth-apps-namespace, x-alkali-auth-entities-namespace, x-alkali-auth-entity, x-alkali-client-locale, EES-S7E-MODE, cast-device-capabilities, X-Server-Timeout, x-foyer-client-environment, x-goog-greenenergyuserappservice-metadata, x-goog-sherlog-context, X-Server-Token
Access-Control-Allow-Methods: GET,HEAD,OPTIONS
Content-Length: 57991476
Content-Range: bytes 0-57991475/57991476
Date: Thu, 13 Apr 2023 09:07:32 GMT
Old-Expires: Thu, 13 Apr 2023 09:07:32 GMT
Old-Cache-Control: private, max-age=0
X-Goog-Hash: crc32c=7cfhZA==
Server: UploadServer
Remote-Ip: 142.250.66.129

Còn đây là khi không dùng Range header, vẫn có Content-Length:
Code:
GET /docs/securesc/uuq7s9io0aigic661od1p0c29dluasjm/6lsqteb8t38ke9a7aqfatvq0ungkf4u1/1681376700000/04238328744718074012/10597165939605172664/1bYHpARq45jEToKVecVES7v_hghb60yA6?e=download&ax=ALy03A7EFQns-V0cX5VZqDAnYnil2jQyA1qAXmwqspjYyFm1B7I6bDFs1ptKNl90pF_1DbM3xvofB2TRHLi4URvyYoXhiYAGiOQeGKorAm43efmfZNBGEQ4gtXLOIR5tiesN1DGoXZr9UO69nP-0XRt6AFP2mJ2pUHye2yoM04CKKoMvDCpGMaT3HLS8Vz7g_EmOaSe7l6HODCUn3-aE4CAX33WR3HfFODdcAiXXMxLhv9ITW7_rT0dRlgnuXupXqMzj-ZRTcsH5olzpDxd9O1i9pJSV7rOkV5bKYK-RoTmQ4d542U1xZ9nziu-3Qb9Byd9ZYwzTRYV6TgBOlysytXL93_gQLnaL0_h4H9qhJUIb-Nb10qrWBlVIJRFVdeo2xG7VISMSrVM4m6XhOgJ38x7bKhExqm6o6KZi0FqgMA6TQfcht_Vk1OTsYGoqIrSf28SNpxKh0zt6chM2PwxxDnvi-CN5bMuF6grHXGm4tXGPa65PmewKVvJr7iCuzC7w67lowEMjkwG9fBRNlsj7E7kfFORZMhAF8lqgg_QP6JwGwZ-IoHucWAfKavL11EoyVKjNwj8t0WCfSDYTkq1PpeGF-yNn4vt5kkVCjg42Kq6rhQDG-lYpC1WU1GXaKEexC_8TSXVoltcOIAqNye1qhmYV-9RMxGqGtloJNGfcUudzeqKIkdVIytNW26KuZkMNuairkAQj5XbBAwwfVh6Hc0oyBEf7oqS5bmCxhGxP1_R82k3ZOjw9cp-rey0EtGhvbhARa5zj2T8XPcvFRucqq6Cl_ys8hvE0liVj6C4GEGINP8zoYk7i3hmzZQXGTTSZdBPNQcECrB68DFiKJ18IajQtd3ntqaiPlKEiVvo_9G_2kFox_vHQPmAdoZpo3kJNVPk&uuid=24c93627-3024-43a4-893b-038a006e3a17&authuser=0&nonce=ol014pd0b6u8m&user=10597165939605172664&hash=u8q2e2hb61fhc0n3mpln5njpv9n0t3bg HTTP/1.1
Host: doc-0c-90-docs.googleusercontent.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Cookie: <REDACTED>
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1

HTTP/1.1 200 OK
Cache-Control: no-store
Pragma: no-cache
X-GUploader-UploadID: ADPycdsBQfJarFtUQSZjys4CiB0t25MRUORS8mMD6USREPd13flFZ3nc9ziRNXa5yS6A4yrEU-adYWSdMl5yGotZbemtRw
Content-Type: application/x-7z-compressed
Content-Disposition: attachment; filename="firefox-104.0.2-2022090215.en-US.win32-tete009-sse2-pgo.7z"; filename*=UTF-8''firefox-104.0.2-2022090215.en-US.win32-tete009-sse2-pgo.7z
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: false
Access-Control-Allow-Headers: Accept, Accept-Language, Authorization, Cache-Control, Content-Disposition, Content-Encoding, Content-Language, Content-Length, Content-MD5, Content-Range, Content-Type, Date, developer-token, financial-institution-id, X-Goog-Sn-Metadata, X-Goog-Sn-PatientId, GData-Version, google-cloud-resource-prefix, linked-customer-id, login-customer-id, x-goog-request-params, Host, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Origin, OriginToken, Pragma, Range, request-id, Slug, Transfer-Encoding, hotrod-board-name, hotrod-chrome-cpu-model, hotrod-chrome-processors, Want-Digest, X-Ad-Manager-Impersonation, x-chrome-connected, X-ClientDetails, X-Client-Version, X-Firebase-Locale, X-Goog-Firebase-Installations-Auth, X-Firebase-Client, X-Firebase-Client-Log-Type, X-Firebase-GMPID, X-Firebase-Auth-Token, X-Firebase-AppCheck, X-Firebase-Token, X-Goog-Drive-Client-Version, X-Goog-Drive-Resource-Keys, X-GData-Client, X-GData-Key, X-GoogApps-Allowed-Domains, X-Goog-AdX-Buyer-Impersonation, X-Goog-Api-Client, X-Goog-Visibilities, X-Goog-AuthUser, x-goog-ext-124712974-jspb, x-goog-ext-467253834-jspb, x-goog-ext-251363160-jspb, x-goog-ext-259736195-jspb, x-goog-ext-477772811-jspb, x-goog-ext-328800237-jspb, X-Goog-PageId, X-Goog-Encode-Response-If-Executable, X-Goog-Correlation-Id, X-Goog-Request-Info, X-Goog-Request-Reason, X-Goog-Request-Time, X-Goog-Experiments, x-goog-iam-authority-selector, x-goog-iam-authorization-token, X-Goog-Spatula, X-Goog-Travel-Bgr, X-Goog-Travel-Settings, X-Goog-Upload-Command, X-Goog-Upload-Content-Disposition, X-Goog-Upload-Content-Length, X-Goog-Upload-Content-Type, X-Goog-Upload-File-Name, X-Goog-Upload-Header-Content-Encoding, X-Goog-Upload-Header-Content-Length, X-Goog-Upload-Header-Content-Type, X-Goog-Upload-Header-Transfer-Encoding, X-Goog-Upload-Offset, X-Goog-Upload-Protocol, x-goog-user-project, X-Goog-Visitor-Id, X-Goog-FieldMask, X-Google-Project-Override, x-goog-maps-api-salt, x-goog-maps-api-signature, x-goog-maps-client-id, X-Goog-Api-Key, X-HTTP-Method-Override, X-JavaScript-User-Agent, X-Pan-Versionid, X-Proxied-User-IP, X-Origin, X-Referer, X-Requested-With, X-Stadia-Client-Context, X-Upload-Content-Length, X-Upload-Content-Type, X-Use-Alt-Service, X-Use-HTTP-Status-Code-Override, X-Ios-Bundle-Identifier, X-Android-Package, X-Ariane-Xsrf-Token, X-YouTube-Bootstrap-Logged-In, X-YouTube-VVT, X-YouTube-Page-CL, X-YouTube-Page-Timestamp, X-Compass-Routing-Destination, x-framework-xsrf-token, X-Goog-Meeting-ABR, X-Goog-Meeting-Botguardid, X-Goog-Meeting-ClientInfo, X-Goog-Meeting-ClientVersion, X-Goog-Meeting-Debugid, X-Goog-Meeting-Identifier, X-Goog-Meeting-Interop-Cohorts, X-Goog-Meeting-Interop-Type, X-Goog-Meeting-RtcClient, X-Goog-Meeting-StartSource, X-Goog-Meeting-Token, X-Goog-Meeting-ViewerInfo, X-Goog-Meeting-Viewer-Token, X-Client-Data, x-sdm-id-token, X-Sfdc-Authorization, MIME-Version, Content-Transfer-Encoding, X-Earth-Engine-App-ID-Token, X-Earth-Engine-Computation-Profile, X-Earth-Engine-Computation-Profiling, X-Play-Console-Experiments-Override, X-Play-Console-Session-Id, x-alkali-account-key, x-alkali-application-key, x-alkali-auth-apps-namespace, x-alkali-auth-entities-namespace, x-alkali-auth-entity, x-alkali-client-locale, EES-S7E-MODE, cast-device-capabilities, X-Server-Timeout, x-foyer-client-environment, x-goog-greenenergyuserappservice-metadata, x-goog-sherlog-context, X-Server-Token
Access-Control-Allow-Methods: GET,HEAD,OPTIONS
Content-Length: 57991476
Date: Thu, 13 Apr 2023 09:06:32 GMT
Old-Expires: Thu, 13 Apr 2023 09:06:32 GMT
Old-Cache-Control: private, max-age=0
X-Goog-Hash: crc32c=7cfhZA==
Server: UploadServer
Remote-Ip: 142.250.66.129
 
Last edited:
Đây là đoạn code khiến cho việc chia luồng từ riêng Drive thất bại: https://github.com/jingyu9575/multi...er/blob/master/src/background/site-handler.ts

Mình nghĩ là có thể tự sửa lại code, xóa drive.google với googleusercontent trong này đi là sẽ chia luồng được.

Code:
import { S } from "./settings.js";
import { ConnectionInfo } from "./connection.js";

interface SiteHandler {
    (url: string, signal: AbortSignal): Promise<Partial<ConnectionInfo>>
}

const siteHandlerMap = new Map<string, SiteHandler>([
    // Google Drive
    ['.googleusercontent.com.', async (url, signal) => {
        const { hostname, pathname } = new URL(url)
        if (!/doc-[-\w]+-docs.googleusercontent.com/.test(hostname)) return {}
        const id = pathname.replace(new URL('.', url).pathname, '')
        const response = await fetch(`https://drive.google.com/file/d/${id}/view`,
            { credentials: "include", signal })
        if (!response.ok) return {}
        const text = await response.text()
        const match = /\[null,"[^\r\n]+\[null,(?:null|\d+),"(\d+)"\]/.exec(text)
        if (match && match[1] && Number.isSafeInteger(Number(match[1])))
            return { totalSize: Number(match[1]) }
        return {}
    }],
])

export class SiteHandlerInvoker {
    private lastController?: AbortController

    abortLast() { if (this.lastController) this.lastController.abort() }

    invoke(url: string) {
        if (!S.useSiteHandlers) return undefined
        try {
            let suffix = '.' + new URL(url).hostname.toLowerCase() + '.'
            for (; suffix; suffix = suffix.replace(/.[^.]*/, '')) {
                const hander = siteHandlerMap.get(suffix)
                if (!hander) continue

                const controller = this.lastController = new AbortController()
                setTimeout(() => controller.abort(), 10000)
                return hander(url, controller.signal)
            }
        } catch { }
        return undefined
    }
}

Đây là code mình sửa lại, đơn giản là để nó không bao giờ tìm ra link Drive để chen ngang, để tí test thử xem (hướng dẫn cách sửa code addon rồi đóng gói lại):

JavaScript:
import { S } from "./settings.js";
import { ConnectionInfo } from "./connection.js";

interface SiteHandler {
    (url: string, signal: AbortSignal): Promise<Partial<ConnectionInfo>>
}

const siteHandlerMap = new Map<string, SiteHandler>([
    // Google Drive
    ['.googleusercontent222222222222222222222222222.com.', async (url, signal) => {
        const { hostname, pathname } = new URL(url)
        if (!/doc-[-\w]+-docs.googleusercontent22222222222222222.com/.test(hostname)) return {}
        const id = pathname.replace(new URL('.', url).pathname, '')
        const response = await fetch(`https://drive.google222222222222222222.com/file/d/${id}/view`,
            { credentials: "include", signal })
        if (!response.ok) return {}
        const text = await response.text()
        const match = /\[null,"[^\r\n]+\[null,(?:null|\d+),"(\d+)"\]/.exec(text)
        if (match && match[1] && Number.isSafeInteger(Number(match[1])))
            return { totalSize: Number(match[1]) }
        return {}
    }],
])

export class SiteHandlerInvoker {
    private lastController?: AbortController

    abortLast() { if (this.lastController) this.lastController.abort() }

    invoke(url: string) {
        if (!S.useSiteHandlers) return undefined
        try {
            let suffix = '.' + new URL(url).hostname.toLowerCase() + '.'
            for (; suffix; suffix = suffix.replace(/.[^.]*/, '')) {
                const hander = siteHandlerMap.get(suffix)
                if (!hander) continue

                const controller = this.lastController = new AbortController()
                setTimeout(() => controller.abort(), 10000)
                return hander(url, controller.signal)
            }
        } catch { }
        return undefined
    }
}
 
Last edited:
ESR 78.x bấm phát là lên, ESR 9x.x thì bấm phát tầm 2 3s sau mới lên, ESR 102.x thì lâu hơn tí nữa :cry: nên e mới ở 78.15
Thật ra thì như vậy cũng không phải chậm lắm đâu. Thêm nữa, anh mở trình duyệt một lần rồi thôi chứ chẳng nhẽ tắt xong mở lại hoài mà phải lo startup time của nó? Tôi thật không hiểu anh được. Cái ESR 78.x cũ lắm rồi, nếu muốn tiếp tục thì phải tự chịu việc không support cho các trang dùng công nghệ web mới chứ còn muốn đòi hỏi gì nữa?
 
Thật ra thì như vậy cũng không phải chậm lắm đâu. Thêm nữa, anh mở trình duyệt một lần rồi thôi chứ chẳng nhẽ tắt xong mở lại hoài mà phải lo startup time của nó? Tôi thật không hiểu anh được. Cái ESR 78.x cũ lắm rồi, nếu muốn tiếp tục thì phải tự chịu việc không support cho các trang dùng công nghệ web mới chứ còn muốn đòi hỏi gì nữa?
Cũng đúng đó, chả đâu ra mình dùng Firefox 6 tháng tắt một lần, mỗi lấn tắt tổng số tab lên tới 10,000, nhìn chung cứ cài Auto Tab Discard là 1 triệu tab còn mở được chứ chả gì, đây là một vài mẹo bảo trì (maintain) giúp Firefox mở cả 6 tháng mà không bị chậm:

  • Vào about:memory rồi chọn GC để Firefox giải phóng bớt RAM thừa đi
  • Vào Task Manager thi thoảng thấy có cái process firefox.exe nào chiếm RAM thì End Process đi, chú ý không động vào cái firefox.exe cha, chỉ mấy thằng con thôi.
  • Vào about:unloads rồi nhấp liên hồi vào nút Unload nếu như muốn tự tay unload tab

Ngoài ra khi dùng Auto Tab Discard, vào about:config xóa sạch trong extensions.webextensions.restrictedDomains để nó unload tất không khoan nhượng bố con thằng nào cả, mặc định nó bỏ sót rất nhiều trang của Mozilla.

Đã update lên #1 cách tinh chỉnh cho Auto Tab Discard.
 
ESR 78.x bấm phát là lên, ESR 9x.x thì bấm phát tầm 2 3s sau mới lên, ESR 102.x thì lâu hơn tí nữa :cry: nên e mới ở 78.15
Bạn cứ mạnh dạn update lên bản mới nhé, từ Firefox 104 nó có tính năng mới là Skeleton UI, khiến Firefox ấn phát lên luôn: https://www.ghacks.net/2021/01/25/firefox-nightly-uses-a-new-skeleton-ui-on-start-on-windows/

Ở đây họ lý giải tại sao bật phát lên luôn quan trọng:
- Nhà có mẫu thân dùng máy tính và có cái laptop chậm, bà mẫu thân khi mở Firefox ấn liên tục vào biểu tượng khiến đến khi Firefox hiện lên thì ra 20 cửa sổ Firefox. Và đó là lý do tại sao cái Skeleton UI này được bật lên mặc định, để tránh những trường hợp học sinh cá biệt như trên xảy ra. :D

Ngoài ra bạn có thể ẩn Firefox vào tray nếu không muốn nó hiện lên chướng mắt như mình, sẽ có hướng dẫn ẩn vào tray dùng External Application Button sau, code tự viết :D

Demo: https://streamable.com/a6ddo6
 
Mình down về dùng thử thấy ổn. Có điều mỗi lần khởi động nó đều hỏi
f7d8c962a3ca7721faaabf12423c668d.png

Có cách nào set nó thành default hoặc ít nhất không hiện cái bảng trên khi khởi động không bác?
Nếu bạn muốn nó không hiện nữa thì chọn "Don't show this message again" rồi Not now.

Còn nếu bạn muốn nó thành Default Browser thì giải nén thẳng vào thư mục firefox chính hãng từ Mozilla là nó thành mặc định như bản chính hãng.

Còn nếu bạn muốn dùng tete dưới dạng Portable (profile cùng folder firefox.exe), dùng tool này để set thành mặc định:

Save lại thành file firefox.vbs, đặt cùng folder với file firefox.exe rồi chạy:
Code:
'Registers Firefox Portable with Default Programs or Default Apps in Windows
'firefoxportable.vbs - created by Ramesh Srinivasan for Winhelponline.com
'v1.0 17-July-2022 - Initial release. Tested on Mozilla Firefox 102.0.1.0.
'v1.1 23-July-2022 - Minor bug fixes.
'v1.2 27-July-2022 - Minor revision. Cleaned up the code.
'Suitable for all Windows versions, including Windows 10/11.
'Tutorial: https://www.winhelponline.com/blog/register-firefox-portable-with-default-apps/

Option Explicit
Dim sAction, sAppPath, sExecPath, sIconPath, objFile, sbaseKey, sbaseKey2, sAppDesc
Dim sClsKey, ArrKeys, regkey
Dim WshShell : Set WshShell = CreateObject("WScript.Shell")
Dim oFSO : Set oFSO = CreateObject("Scripting.FileSystemObject")

Set objFile = oFSO.GetFile(WScript.ScriptFullName)
sAppPath = oFSO.GetParentFolderName(objFile)
sExecPath = sAppPath & "\firefox.exe"
sIconPath = sAppPath & "\firefox.exe"
sAppDesc = "Firefox delivers safe, easy web browsing. " & _
"A familiar user interface, enhanced security features including " & _
"protection from online identity theft, and integrated search let " & _
"you get the most out of the web."

'Quit if FirefoxPortable.exe is missing in the current folder!
If Not oFSO.FileExists (sExecPath) Then
   MsgBox "Please run this script from Firefox Portable folder. The script will now quit.", _
   vbOKOnly + vbInformation, "Register Firefox Portable with Default Apps"
   WScript.Quit
End If

If InStr(sExecPath, " ") > 0 Then
   sExecPath = """" & sExecPath & """"
   sIconPath = """" & sIconPath & """"
End If

sbaseKey = "HKCU\Software\"
sbaseKey2 = sbaseKey & "Clients\StartmenuInternet\Firefox Portable\"
sClsKey = sbaseKey & "Classes\"

If WScript.Arguments.Count > 0 Then
   If UCase(Trim(WScript.Arguments(0))) = "-REG" Then Call RegisterFirefoxPortable
   If UCase(Trim(WScript.Arguments(0))) = "-UNREG" Then Call UnRegisterFirefoxPortable
Else
   sAction = InputBox ("Type REGISTER to add Firefox Portable to Default Apps. " & _
   "Type UNREGISTER To remove.", "Firefox Portable Registration", "REGISTER")
   If UCase(Trim(sAction)) = "REGISTER" Then Call RegisterFirefoxPortable
   If UCase(Trim(sAction)) = "UNREGISTER" Then Call UnRegisterFirefoxPortable
End If

Sub RegisterFirefoxPortable 
   WshShell.RegWrite sbaseKey & "RegisteredApplications\Firefox Portable", _
   "Software\Clients\StartMenuInternet\Firefox Portable\Capabilities", "REG_SZ"
 
   'FirefoxHTML registration
   WshShell.RegWrite sClsKey & "FirefoxHTML2\", "Firefox HTML Document", "REG_SZ"
   WshShell.RegWrite sClsKey & "FirefoxHTML2\EditFlags", 2, "REG_DWORD"
   WshShell.RegWrite sClsKey & "FirefoxHTML2\FriendlyTypeName", "Firefox HTML Document", "REG_SZ"
   WshShell.RegWrite sClsKey & "FirefoxHTML2\DefaultIcon\", sIconPath & ",1", "REG_SZ"
   WshShell.RegWrite sClsKey & "FirefoxHTML2\shell\", "open", "REG_SZ"
   WshShell.RegWrite sClsKey & "FirefoxHTML2\shell\open\command\", sExecPath & _
   " -url " & """" & "%1" & """", "REG_SZ"
   WshShell.RegWrite sClsKey & "FirefoxHTML2\shell\open\ddeexec\", "", "REG_SZ"
 
   'FirefoxPDF registration
   WshShell.RegWrite sClsKey & "FirefoxPDF2\", "Firefox PDF Document", "REG_SZ"
   WshShell.RegWrite sClsKey & "FirefoxPDF2\EditFlags", 2, "REG_DWORD"
   WshShell.RegWrite sClsKey & "FirefoxPDF2\FriendlyTypeName", "Firefox PDF Document", "REG_SZ"
   WshShell.RegWrite sClsKey & "FirefoxPDF2\DefaultIcon\", sIconPath & ",5", "REG_SZ"
   WshShell.RegWrite sClsKey & "FirefoxPDF2\shell\open\", "open", "REG_SZ"
   WshShell.RegWrite sClsKey & "FirefoxPDF2\shell\open\command\", sExecPath & _
   " -url " & """" & "%1" & """", "REG_SZ"
 
   'FirefoxURL registration
   WshShell.RegWrite sClsKey & "FirefoxURL2\", "Firefox URL", "REG_SZ"
   WshShell.RegWrite sClsKey & "FirefoxURL2\EditFlags", 2, "REG_DWORD"
   WshShell.RegWrite sClsKey & "FirefoxURL2\FriendlyTypeName", "Firefox URL", "REG_SZ"
   WshShell.RegWrite sClsKey & "FirefoxURL2\URL Protocol", "", "REG_SZ"
   WshShell.RegWrite sClsKey & "FirefoxURL2\DefaultIcon\", sIconPath & ",1", "REG_SZ"
   WshShell.RegWrite sClsKey & "FirefoxURL2\shell\open\", "open", "REG_SZ"
   WshShell.RegWrite sClsKey & "FirefoxURL2\shell\open\command\", sExecPath & _
   " -url " & """" & "%1" & """", "REG_SZ"
   WshShell.RegWrite sClsKey & "FirefoxURL2\shell\open\ddeexec\", "", "REG_SZ" 
 
   'Default Apps Registration/Capabilities
   WshShell.RegWrite sbaseKey2, "Firefox Portable", "REG_SZ"
   WshShell.RegWrite sbaseKey2 & "Capabilities\ApplicationDescription", sAppDesc, "REG_SZ"
   WshShell.RegWrite sbaseKey2 & "Capabilities\ApplicationIcon", sIconPath & ",0", "REG_SZ"
   WshShell.RegWrite sbaseKey2 & "Capabilities\ApplicationName", "Firefox Portable", "REG_SZ"
   WshShell.RegWrite sbaseKey2 & "Capabilities\FileAssociations\.pdf", "FirefoxPDF2", "REG_SZ"
   WshShell.RegWrite sbaseKey2 & "Capabilities\StartMenu", "Firefox Portable", "REG_SZ"
   WshShell.RegWrite sbaseKey2 & "DefaultIcon\", sIconPath & ",0", "REG_SZ"
   WshShell.RegWrite sbaseKey2 & "shell\open\command\", sExecPath, "REG_SZ"
   WshShell.RegWrite sbaseKey2 & "shell\properties\", "Firefox &Options", "REG_SZ"
   WshShell.RegWrite sbaseKey2 & "shell\properties\command\", sExecPath & " -preferences", "REG_SZ"
   WshShell.RegWrite sbaseKey2 & "shell\safemode\", "Firefox &Safe Mode", "REG_SZ" 
   WshShell.RegWrite sbaseKey2 & "shell\safemode\command\", sExecPath & " -safe-mode", "REG_SZ"
 
   ArrKeys = Array ( _
   "FileAssociations\.avif", _
   "FileAssociations\.htm", _
   "FileAssociations\.html", _
   "FileAssociations\.shtml", _
   "FileAssociations\.svg", _
   "FileAssociations\.webp", _
   "FileAssociations\.xht", _
   "FileAssociations\.xhtml", _
   "URLAssociations\http", _
   "URLAssociations\https", _
   "URLAssociations\mailto" _
   )
 
   For Each regkey In ArrKeys
      WshShell.RegWrite sbaseKey2 & "Capabilities\" & regkey, "FirefoxHTML2", "REG_SZ"
   Next    
 
   'Override the default app name by which the program appears in Default Apps  (*Optional*)
   '(i.e., -- "Mozilla Firefox, Portable Edition" Vs. "Firefox Portable")
   'The official Mozilla Firefox setup doesn't add this registry key.
   WshShell.RegWrite sClsKey & "FirefoxHTML2\Application\ApplicationIcon", sIconPath & ",0", "REG_SZ"
   WshShell.RegWrite sClsKey & "FirefoxHTML2\Application\ApplicationName", "Firefox Portable", "REG_SZ"
 
   'Launch Default Programs or Default Apps after registering Firefox Portable 
   WshShell.Run "control /name Microsoft.DefaultPrograms /page pageDefaultProgram"
End Sub


Sub UnRegisterFirefoxPortable
   sbaseKey = "HKCU\Software\"
   sbaseKey2 = "HKCU\Software\Clients\StartmenuInternet\Firefox Portable" 
 
   On Error Resume Next
   WshShell.RegDelete sbaseKey & "RegisteredApplications\Firefox Portable"
   On Error GoTo 0
 
   WshShell.Run "reg.exe delete " & sClsKey & "FirefoxHTML2" & " /f", 0
   WshShell.Run "reg.exe delete " & sClsKey & "FirefoxPDF2" & " /f", 0
   WshShell.Run "reg.exe delete " & sClsKey & "FirefoxURL2" & " /f", 0
   WshShell.Run "reg.exe delete " & chr(34) & sbaseKey2 & chr(34) & " /f", 0
 
   'Launch Default Apps after unregistering Firefox Portable 
   WshShell.Run "control /name Microsoft.DefaultPrograms /page pageDefaultProgram" 
End Sub
 
Last edited:
Đã cho lên #1 ngay và luôn, với cái này thì IDM chả đáng dùng nữa, vừa miễn phí, vừa hoạt động trong Firefox nên tính gắn kết cao hơn, lại còn hỗ trợ đa luồng, giới hạn số lượng tải về, bắt link video (trong +, vào thẻ Media nó bắt hết link video trong trang không cần dùng BulkMediaDownloader), bắt link hàng loạt. :D
MDM không có scheduler không có blacklist không có dup check không có categorize không có speed limit không có post-download action và nó vẫn cần yt-dlp để lấy media nên nói thế là không đúng
 
Last edited:
MDM không có scheduler không có blacklist không có dup check không có categorize không có speed limit không có post-download action và nó vẫn cần yt-dlp để lấy media nên nói thế là không đúng
Nó bắt link video theo kiểu Firefox thấy gì nó thấy cái đó, như ví dụ tải Youtube đây nhẹ nhàng: https://streamable.com/bld8v7
Speed limit thì giới hạn còn 1 luồng là xong, với lại không hữu ích lắm.
Còn scheduler đã giới thiệu bên trên, giới hạn số lượng tải về ở cùng một thời điểm như 1 là nó tải từng link một.
Duplicate check với blacklist mình không thấy có lý do gì để dùng, toàn tính năng gọi là để cho có chứ cả đời chả dùng đến một lần.
 
Back
Top