thickbox not behaving like it should
I'm creating a greasemon开发者_如何学编程key script. One of the functions it should do is close any thickboxes that open with the page (like when you visit sidereel for the first time). I put this line in
$('.ui-icon-closethick').click()
Yet it doesn't seem to do the trick. Am I missing something?
The script is being executed after the popup is opened, so basically you can't prevent it from opening using Greasemonkey.
However, there is an addon called Mason that will help you.
Just add the following rule:
Description : sidereel : Fake login
Include URL : ^http:\/\/www\.sidereel\.com\/
Function : Cookie Definition
Config... : seen_saved_source_popup=true
Leave the other fields blank.
If flashing the popup isn't the problem, then you may use the following:
// ==UserScript==
// @name sidereel : hide welcome
// @namespace http://stackoverflow.com/questions/5288097/
// @include http://www.sidereel.com/*
// ==/UserScript==
if (unsafeWindow.$)
unsafeWindow.$("div[id *= 'lightbox-saved-source-']").dialog("close");
精彩评论