Tiện ích trình duyệt Firefox
  • Tiện ích mở rộng
  • Chủ đề
    • cho Firefox
    • Từ điển & gói ngôn ngữ
    • Các trang web trình duyệt khác
    • Tiện ích cho Android
Đăng nhập
Xem trước Unread Tabs Restorer

Unread Tabs Restorer bởi satcp

Restores ability to style unread tabs via userChrome.css.

5 (7 reviews)5 (7 reviews)
21 Users21 Users
Bạn sẽ cần Firefox để sử dụng tiện ích mở rộng này
Tải xuống Firefox và tải tiện ích mở rộng
Tải xuống tập tin

Siêu dữ liệu mở rộng

Ảnh chụp màn hình
Về tiện ích mở rộng này
Unread Tabs Restorer

Some Firefox users prefer to apply different styles to tabs depending on their status for clarity: unloaded, unread,... In the past there were extensions like Tab Mix Plus that do this but support for legacy XUL extensions was removed with the release of Firefox 57 in November 2017. Many legacy extensions, including Tab Mix Plus, were never upgraded to WebExtensions due to limitations of the new API. Nevertheless, it was still possible to style tabs depending on their status through userChrome.css:

.tabbrowser-tab[pending] { /* Set styles for unloaded tab */ }
.tabbrowser-tab[busy] { /* Set styles for loading tab */ }
.tabbrowser-tab[unread] { /* Set styles for unread tab */ }


With the release of Firefox 61 in June 2018 support was removed for detecting unread tabs in userChrome.css [Bug 1453957].

At this moment the only way to restore this functionality is by injecting JavaScript in each tab page to change the tab title after loading the page. That is exactly what this extension does. The tab title change can be detected in userChrome.css with titlechanged. After installing this extension .tabbrowser-tab[unread] must be changed to .tabbrowser-tab[titlechanged] in userChrome.css:

.tabbrowser-tab[pending] { /* Set styles for unloaded tab */ }
.tabbrowser-tab[busy] { /* Set styles for loading tab */ }
.tabbrowser-tab[titlechanged] { /* Set styles for unread tab */ }


Permissions

Unread Tabs Restorer requires following permissions:
  • Access your data for all web sites
  • Access browser tabs
Why does this extension require access your data for all web sites? The unread functionality can only be restored by injecting JavaScript in all tabs. If you think this is unacceptable, please do not install this extension. If you want to know what exactly the extension does, download the extension xpi file, unpack it and inspect the content.

Principle of operation

The extension is less than 40 lines of code spread over 3 files:
  • background.js
  • tab_loaded.js
  • tab_activated.js
Script background.js executes tab_loaded.js when a tab is loaded in the background and tab_activated.js when a tab is selected. Script tab_loaded.js appends a hidden character to the tab title to trigger titlechanged that can be used in userChrome.css. Script tab_activated.js removes the hidden character again.

Usage

To use custom tab styles and Unread Tabs Restorer you must enable the loading of userChrome.css. This is disabled by default in newer Firefox versions:
  • Launch Firefox
  • Navigate to about:config
  • Search for toolkit.legacyUserProfileCustomizations.stylesheets and set it to true
  • Navigate to about:profiles
  • Locate the Root Directory of the profile in use and click the Open Folder button
  • Create a new folder named chrome
  • Create a new text file named userChrome.css in the chrome folder
  • Open userChrome.css in a plain text editor and paste following CSS styles:
.tabbrowser-tab[pending] { color: red !important; }
.tabbrowser-tab[busy] { color: dimgray !important; }
.tabbrowser-tab[titlechanged] { color: blue !important; }


This will make the text of unloaded tabs red, loading tabs grey and unread tabs blue. Feel free to customize the styles to your liking.

Finally restart Firefox to enjoy the new tab styles.

Future

There are no plans to add additional features to Unread Tabs Restorer. The extension was developed only to restore the lost functionality of unread tabs. The extension will become obsolete when Mozilla reimplements the unread tabs functionality or removes support for userChrome.css completely.

Credits

Unread Tabs Restorer is based on the Tab Flag extension by EffPeh.

License

Unread Tabs Restorer is published under the Mozilla Public License Version 2.0.
Được xếp hạng 5 (bởi 1 người dùng)
Đăng nhập để đánh giá tiện ích này
Chưa có xếp hạng nào

Đã lưu xếp hạng sao

5
7
4
0
3
0
2
0
1
0
Đọc tất cả 7 đánh giá
Quyền hạn và dữ liệuTìm hiểu thêm

Quyền hạn bắt buộc:

  • Truy cập các thẻ trên trình duyệt
  • Truy cập dữ liệu của bạn trên mọi trang web
Thêm thông tin
Phiên bản
1.0
Kích cỡ
17,71 KB
Cập nhật gần nhất
4 năm trước (11 Thg 12 2021)
Thể loại có liên quan
  • Thẻ
Giấy phép
Mozilla Public License 2.0
Lịch sử các phiên bản
  • Xem tất cả phiên bản
Thêm vào bộ sưu tập
Báo cáo tiện ích này
Tiện ích mở rộng khác của satcp
  • Chưa có xếp hạng nào

  • Chưa có xếp hạng nào

  • Chưa có xếp hạng nào

  • Chưa có xếp hạng nào

  • Chưa có xếp hạng nào

  • Chưa có xếp hạng nào

Đi đến trang chủ Mozilla

Tiện ích

  • Giới thiệu
  • Blog tiện ích Firefox
  • Extension Workshop
  • Trung tâm nhà phát triển
  • Chính sách nhà phát triển
  • Blog cộng đồng
  • Diễn đàn
  • Báo cáo một lỗi
  • Hướng dẫn đánh giá

Trình duyệt

  • Desktop
  • Mobile
  • Enterprise

Sản phẩm

  • Browsers
  • VPN
  • Relay
  • Monitor
  • Pocket
  • Bluesky (@firefox.com)
  • Instagram (Firefox)
  • YouTube (firefoxchannel)
  • Riêng tư
  • Cookie
  • Pháp lý

Trừ trường hợp khác đã ghi chú, nội dung trên trang này được cấp phép theo giấy phép Creative Commons Attribution Share-Alike v3.0 hoặc bất kỳ phiên bản nào sau này.