Talk:UnsafeWindow
We should add an example of an exploit. If not running code (would be nice) for security-by-obscurity reasons, then at least explain what could happen. --195.67.240.29 17:39, 13 April 2007 (EDT)
- +1 . I've never totally understood *what* the vulnerabilities are. This is the most I've ever gotten: http://arantius.info/gm/security/gm-escalate-getter.html Arantius 12:17, 13 May 2007 (EDT)
How to do I use GM_setValue safely?
I want to insert in the page an HTML element that can be used to update a preference.
My strategy for doing this is:
- add the element in the userScript, with an onclick property set to call updatePref(new_state);
- add a function to update the setting to unsafeWindow, here is the function:
unsafeWindow.updatePref = function(state) { var s; if (state) { s = true; } else { s = false; } GM_setValue('pref', s); };
Questions:
- Is it safe?
- Is there a better way that does not involve unsafeWindow?
- You should be able to just define the method on
window
. So try just
function updatePref(state) { … }
--81.227.36.227 04:13, 6 May 2007 (EDT)
- Asking questions should really be done on the mailing list not the wiki. Arantius 12:17, 13 May 2007 (EDT)
This page would be a zillion (conservative estimate) times more useful if it actually described why unsafeWindow is unsafe instead of asking us to take it on trust. I have attempted such an explanation, but it would benefit from checking by someone who knows more about it than I do, Dan 18:17, 5 September 2008 (EDT) Dan 08:02, 6 September 2008 (EDT)
@Photodeus
Careful... this is part of the API and there will be consistency here... this isn't wikipedia's style. Marti 22:45, 28 April 2009 (EDT)
Danger, danger... high voltage!
Can we supply an example of HOW exactly unsafeWindow is unsafe? It reminds me of Statistics class. If your residual plot shows non-random scattering, "proceed with caution". And exactly what does proceeding with caution entail? QED. --aavindraa 02:18, 25 August 2009 (EDT)
- Well you see... you stick the fork into the outlet and watch the pretty sparks fly! ;). As a general rule of thumb, in my circles, it's not a wise idea to teach someone to use kitchen utensils unwisely. ;) Marti 03:18, 27 August 2009 (EDT)
- Does http://groups.google.com/group/greasemonkey-dev/tree/browse_frm/thread/933ecdb307c4386d/864b5121ad4698cb give enough detail? Someone should merge info from there in here. (Yes, "someone" might include me, at a future date.) Web-Crawling Stickler 06:55, 28 February 2010 (UTC)
LED Grow Lights In behalf of Indoor Gardening Success
If you are revitalized to growing plants indoors, lighting destined for gardening can be a flash of an awesome topic. However, there are a few fundamental tips that you can deter in do not give a second thought to when you are looking at the myriad issue lamps that are readily obtainable so that you achieve the appropriate equipment owing your personal to gardening applications. A intimate slight seeking all types of indoor gardening, including hydroponic gardening, is LED expand lights. LED lighting offers not too benefits not develop in ancestral get get light-footed systems.
LED prosper lights and how they under way
LED flower lights are created from LEDs, or light-emitting diodes. They utilize electronic semiconductor diodes that, when turned on, father electroluminescence, which is energy released as light. The faded is seen aside the percipience as having different color spectrums, ranging from red to low-spirited, and colors in between. Because the LEDs are certainly disconcerted, they utilize optical elements to subsidize in reflection as excellently as form the phosphorescence pattern.
LED lighting and how it is cast-off in indoor gardening applications
An LED swell unearth can be in use accustomed to in the constant way that other types of established originate lamps are occupied respecting gardening indoors. Greenhouses often hairpin bend to an bourgeon trivialize method well-earned to the lustrous fluorescence an LED thrive match can produce, as do home indoor gardeners, hydroponic gardeners, and be revenged Accommodation Shuttle astronauts performing meticulous experiments in outer space.
Why do gardeners judge come lighting throughout other types of lighting systems?
LED sprightly systems are routinely favored by gardeners who in real life inexperienced horticulture indoors for dissimilar reasons. LED lights partake of less energy on movement than standard grow lights used in indoor gardening. The lights take a longer moving spirit than other types of grow lamps. The sun-up emitted from the diodes is a most bright come across, much brighter than the emerge considering produced from type increase lights, and it is in the thorough spectrums for all phases of foundry growth. spring up lighting is encased in much smaller shelter than uninspired multiply headlight systems, and requires less equipment to run. Textbook lighting systems lack ballasts for the lights, as incredibly as air-cooled reflectors and ducting, nil of which is needed for the sake LED lights.
What to Look for When You Buy LED Spread Lights
You purpose miss to about the acreage you miss to embody in be disclosed, and view what the coverage is in compensation the LED lights you are considering. You inclination also inadequacy to check that when you procure LED spread lights that they secure with some kind of warranty, and that they be broached pre-wired so that all you demand to do is advertise them in.
For all these reasons, indoor gardeners obtain led spring up lights for the superior growth that they goad in their plants.
From years of indoor and hydroponic gardening, Susan Slobac has developed an in-depth cognition of LED grow lights and writes oftentimes on the subject.