Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

How to determine the tab is pinned (in GreaseMonkey)

  • 1 trả lời
  • 1 gặp vấn đề này
  • 11 lượt xem
  • Trả lời mới nhất được viết bởi Gingerbread Man

more options

Hi.

Is there any possibility in Firefox, how to determine in GreaseMonkey/Scriptish, that the tab is pinned. I have a script, which reloads my favorite website and notifies me, when there is something new. But I would like to run this script only for pinned tabs.

Thank you very much.

Hi. Is there any possibility in Firefox, how to determine in GreaseMonkey/Scriptish, that the tab is pinned. I have a script, which reloads my favorite website and notifies me, when there is something new. But I would like to run this script only for pinned tabs. Thank you very much.

Tất cả các câu trả lời (1)

more options

Hello,

If you only pin particular sites, the safest thing to do is to change the URLs the script can run on.

  1. Open the Add-ons Manager, User Scripts category.
  2. Click the Options button next to the script.
  3. Enter the URLs in the Includes box, and check the "Disable this script's include patterns" option.

I'm not sure a user script can fetch the attribute values of a user interface element. Either way, I really don't recommend it.
For security reasons, Greasemonkey and Scriptish won't touch the chrome: scheme by default. It would be a bad idea to change this behavior, as it would change the permission for all scripts, including those you download from the web. You can change it by typing about:config into the address bar, then extensions.*.chrome into the search box there and double-clicking the respective preference to toggle it.

If you still want to go down this road and you don't get an answer here, ask on