Talk:Greasemonkey Manual:API: Difference between revisions

From GreaseSpot Wiki
Jump to navigationJump to search
m (Arantius moved page User:Greasemonkey Manual:API to Talk:Greasemonkey Manual:API over redirect: revert)
 
(38 intermediate revisions by 21 users not shown)
Line 24: Line 24:


: 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]]. [[User:Arantius|Arantius]] 12:55, 27 July 2010 (UTC)
: 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]]. [[User:Arantius|Arantius]] 12:55, 27 July 2010 (UTC)
== Подскажите надежный сайт знакомств J. ==
Вопрос:   Я очень хочу познакомиться с спокойной девушкой. Времени после учебы совсем не остается, а в праздники обычно необходимо тоже  работать. Вметро знакомиться не удобно.  Пока на сайтах встречаю  преимущественно проституток. Предложите вариант решения проблемы, пожалуйста. Заранее большое спасибо ….
== Сервис Яндекс Денег ==
Сервис Яндекс Денег
- Покупка заблокированных яндекс аккаунтов с платежным паролем
- Покупка яндекс аккаунтов без платежки (суммы от 10к)
- Покупка заблокированных идентифицированных аккаунтов Яд (суммы от 10к)
- Продажа идентифицированных Яд аккаунтов с дроп поддержкой на случай лока (1000 руб)
- Разлочка вашего заблокированного аккаунта удаленно(договорной
- Ускоренная идентификация(подробности в асе)
<b>611-344-141 практически всегда в сети </b>
для получения более полного ответа желательно иметь скрин истории платежей или ответ саппорта яд о причине лока.

Latest revision as of 23:31, 2 October 2023

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)