I would suggest that Greasemonkey users are nowhere near common enough to make this a reasonable feature to include in the Firefox core. However, the problem may be common enough among Greasemonkey users to make its introduction as an integrated *Greasemonkey* feature reasonable. Maybe an @stylesheet rule that specifies the filename of a chunk of CSS that is inserted in the same way that Stylish does would be reasonable. Of course, this would seem to duplicate the functionality of Stylish. Alternatively, you could add an @fouc-prevent rule that causes Greasemonkey to hide the page's content until after scripts are run, which would solve the common use case for including CSS before the script runs (doing so afterwards can already be accomplished via a combination of @resource/GM_addStyles()).
--Tom yhoshua512 wrote: > > > On Mon, 8 Sep 2008, Anthony Lieuallen wrote: > >> On 9/8/2008 9:21 AM, V S Rawat wrote: >>> I think gm executes on a page only when it is fully loaded. >> http://wiki.greasespot.net/DOMContentLoaded > > The wiki article referenced above discusses a userContent.css > workaround to eliminate "flicker," the brief, but visible, rendering > of the original web page before the greasemonkey script is injected > and alters the page. The article states, "Generally, flicker is a > problem that should be ignored. If, however, a script author decides > that it must be avoided there is at least one technique. . . ." > > I'm curious why the author believes that flicker "generally. . .should > be ignored." I finally took the time to figure out how to implement > the workaround, incorporated it into one of my scripts, and gave users > of my script instructions on how to edit their userContent.css > file. Results have been great. Users are praising the improvement, > and no one is complaining that editing the file is difficult. > > I, myself, am seeing a significant improvement in the smoothness of > page loading. I previously had my Firefox nglayout.initialpaint.delay > preference set to 850 ms in order to avoid seeing flicker. I've now > been able to reduce it to 0; thus not only do pages load more > smoothly, but on average, they load faster. > > This so-called workaround works so well I'm wondering why Mozilla does > not provide a Firefox preference that can be set to wait for the > DOMContentLoaded event to fire on all web pages. I wouldn't think > that the loading of many web pages would be significantly delayed by > waiting for the DOM to load, and greasemonkey users, who are numerous, > would find it very useful. > > --~--~---------~--~----~------------~-------~--~----~ > You received this message because you are subscribed to the Google Groups > "greasemonkey-users" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to [EMAIL PROTECTED] > For more options, visit this group at > http://groups.google.com/group/greasemonkey-users?hl=en > -~----------~----~----~----~------~----~------~--~--- >
signature.asc
Description: OpenPGP digital signature
