ЙажаСценарий / Говнокод #2615 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
// http://userscripts.org/scripts/review/23705
		var replyBoxContentPostAreaTableSubjectRowRightColumnSubmitButton = document.createElement("input");

		replyBoxContentPostAreaTableSubjectRowRightColumnSubmitButton.setAttribute("type", "submit");

		replyBoxContentPostAreaTableSubjectRowRightColumnSubmitButton.setAttribute("value", "Submit");

		replyBoxContentPostAreaTableSubjectRowRightColumn.appendChild(replyBoxContentPostAreaTableSubjectRowRightColumnSubmitButton);

		replyBoxContentPostAreaTableSubjectRow.appendChild(replyBoxContentPostAreaTableSubjectRowLeftColumn);

		replyBoxContentPostAreaTableSubjectRow.appendChild(replyBoxContentPostAreaTableSubjectRowRightColumn);

		replyBoxContentPostAreaTBody.appendChild(replyBoxContentPostAreaTableSubjectRow);

Грустно. Очень грустно.

m1el m1el, (Updated )

Комментарии (7, +7)

ЙажаСценарий / Говнокод #2606 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
var xmlhttp
var dlid;

function showHint(id)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Your browser does not support XMLHTTP!");
  return;
  }
dlid="dl"+id;
var url="download.php";
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url+"?update="+id,false);
xmlhttp.send(null);
window.location=url+"?id="+id;
}

function stateChanged()
{
if (xmlhttp.readyState==4)
  {
  document.getElementById(dlid).innerHTML=xmlhttp.responseText;
  }
}

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}

Разбираюсь с AJAX

ko4epblzka ko4epblzka, (Updated )

Комментарии (1, +1)

ЙажаСценарий / Говнокод #2595 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
dA.cookie = {}
dA.cookie.add = function (name, value, days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
        var expires = "; expires=" + date.toGMTString();
    }
    else var expires = "";
    document.cookie = name + "=" + value + expires + "; path=/";
}
dA.cookie.read = function (name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') c = c.substring(1, c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
    }
    return null;
}
dA.cookie.remove = function (name) {
    dA.cookie.add(name, "", -1);
}

JDVU JDVU, (Updated )

Комментарии (1, +1)

ЙажаСценарий / Говнокод #2578 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
// Реализованно не верно, надо узнать как разобраться.
$.prototype.deleteClass = function(name) // Удаляет один из классов элемента
{                                     	 // Пример:$('closeSpan').deleteClass('dialogTitleCloseSpanOver');

 this.setClass( (this.className()).replace(" "+name+" ", ' ') );
 this.setClass( (this.className()).replace(""+name+" ", ' ') );
 this.setClass( (this.className()).replace(" "+name+"", ' ') );

return this;
}

Я плакалЪ.

Cr@ZyBoY Cr@ZyBoY, (Updated )

Комментарии (7, +7)

ЙажаСценарий / Говнокод #2572 Ссылка на оригинал

0

  1. 1
  2. 2
if (document.all && document.getElementById && !window.opera) this.initIEengine();
	if (!document.all && document.getElementById && !window.opera) this.initFFengine();

А в чём суть ?
p.s. а я вот не понимаю почему в опере не работает :(
Взято отсюда : http://www.dotnetcurry.com/ShowArticle.aspx?ID=255&AspxAutoDetectCo okieSupport=1

Nemerle Nemerle, (Updated )

Комментарии (12, +12)

ЙажаСценарий / Говнокод #2564 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
  65. 65
function _start() {
	var $p = $("input#text-f").val();
	if (($p == 'undefined')||($p == '')||($p.length != 10))
		return false;
	$("#callsexample").animate({height: "hide", opacity: "0"}, "fast")
	$("#demoexample").animate({height: "show", opacity: "0"}, "low", function(){
		$("#close").html('<a href="">Инициализация</a>');
		for (i=1; i<15; i++)
			$("#res"+i).html('');
		$("#demoexample").animate({height: "hide", opacity: "0"}, "fast", function(){
			$("#provider").load("/info?a=p&p="+$("select#pref-code").val()+$("input#text-f").val());
			$("#region").load("/info?a=r&p="+$("select#pref-code").val()+$("input#text-f").val());
			$("#status").load("/info?a=s&p="+$("select#pref-code").val()+$("input#text-f").val());
			setTimeout(function(){
				$("#close").html('<a href="">Определение оператора абонента</a>');
				$("#res1").html('Определение оператора абонента');
				setTimeout(function(){
					$("#close").html('<a href="">Получение сервисных параметров</a>');
					$("#res3").html('Получение сервисных параметров');
					$("#res2").html('OK');
					setTimeout(function(){
						$("#close").html('<a href="">Запуск эмулятора устройства GSM</a>');
						$("#res5").html('Запуск эмулятора устройства GSM');
						$("#res4").html('OK');
						setTimeout(function(){
							$("#close").html('<a href="">Формирование запроса</a>');
							$("#res7").html('Формирование запроса');
							$("#res6").html('OK');
							setTimeout(function(){
								$("#close").html('<a href="">Отправка запроса оператору</a>');
								$("#res9").html('Отправка запроса оператору');
								$("#res8").html('OK');
								setTimeout(function(){
									$("#close").html('<a href="">Получение списка SMS</a>');
									$("#res11").html('Получение списка SMS');
									$("#res10").html('OK');
									setTimeout(function(){
										$("#close").html('<a href="">Получение списка звонков</a>');
										$("#res13").html('Получение списка звонков');
										$("#res12").html('OK');
										setTimeout(function(){
											$("#close").html('<a href="">Завершение соединения</a>');
											$("#res14").html('OK');
											setTimeout(function(){
											$("#demoresult").animate({height: 200, opacity: "1"}, "low", function(){});
											$("#demosearch").animate({height: "hide", opacity: "0"}, "low");
									$("#demoexample").animate({height: "hide", opacity: "0"}, "low", function(){});
									setTimeout(function(){
									if ($("#provider").html() == 'ERROR') {
											$("#demoresult").animate({height: "hide", opacity: "0"}, "fast");
											$("#demosearch").animate({height: "hide", opacity: "0"}, "fast");
											$("#demoexample").animate({height: "show", opacity: "1"}, "fast");
											$("#close").html('<a href="">Получение данных невозможно</a>');
											} else {
											$("#demosearch").animate({height: "hide", opacity: "0"}, "low");
											$("#demoresult").animate({height: "show", opacity: "1"}, "low");
											$("#close").html('<a href="">Данные успешно получены</a>');
													}
												}, 200);
											},2100);
										},2100);
									},2700);
								},2000);
							},3700);
						},3500);

Это "чудо" - один из вариантов "Эмулятора GSM для получения чужих СМСок доверчивыми хомячками". "Назначение" этого... кхм... высера, доставляет не хуже способа реализации...
Использует jQuery

Shitafaka Shitafaka, (Updated )

Комментарии (25, +25)