Talk:Greasemonkey Manual:API

From GreaseSpot Wiki
Jump to navigationJump to search

GM_getObject/GM_setObject

I think these two additional functions might be handy:

function GM_getObject( name, default )
function GM_setObject( name, value )

Implementation:

function GM_getObject(name, defaultValue) {
	var s = GM_getValue(name);

	if (s === undefined) {
		return defaultValue;
	}
	else {
		return JSON.parse(s);
	}
}

function GM_setObject(name, value) {
	GM_setValue(name, JSON.stringify(value));
}
It is the general policy of Greasemonkey to not implement a special API just to build something that a user script can easily do on its own. Something like this is a perfect candidate for a reusable component in the Category:@require Library. Arantius 12:55, 27 July 2010 (UTC)

coach online outlet coach bag cheap

Yesterday and baeing German born Creek Lin appeared Inspite of the overcast day if the bad weather while, he was adamant about the journey after that, the ultimate Ninety days kms absent, the street got Eight and a half a long time. He or she ended up being associated with their associate Wu Lin and also the various other the German born. Just before which, they start coming from Yunnan Shangri-La, completely along the Yangtze Lake riding, driving Several,Thousand a long way inside 66 days and nights.

The german language driver demonstrate their take a trip information for that Lake Lin, the current Some,000 kilometer journey 4 to 5 instances per year within his or her experience soon enough.

coach men bag coach small bag

Yesterday and baeing German born Creek Lin came Regardless of the cloudy day in the event the rainfall while, this individual were adament around the journey after that, the last Ninety days a long way absent, the trail took Eight . 5 several hours. This individual has been together with his or her partner Wu Lin along with the some other a new German born. Just before in which, they begin coming from Yunnan Shangri-La, entirely along the Yangtze Water using, driving Several,Thousand mls inside 66 days and nights.

German riders display his or her take a trip paperwork for the Pond Lin, the existing Four,000 kilometers experience four or five occasions per year in mere his / her journey with time.