Отключение отправки жалоб на грамматические ошибки

Отключение отправки жалоб на грамматические ошибки

Хак поможет отключить на сайте функцию отправки жалоб на грамматические ошибки, которая выводится по комбинации клавиш Ctrl+Enter.


Установка:
1. Открыть engine/classes/js/dle_js.js найти и удалить:
jQuery(function(a){var c=!1;a(document).keydown(function(b){if(13==b.which&&b.ctrlKey){b.preventDefault();if(window.getSelection)var c=window.getSelection();else document.getSelection?c=document.getSelection():document.selection&&(c=document.selection.createRange().text);if(""==c)return!1;if(255<c.toString().length)return DLEalert(dle_big_text,dle_info),!1;b={};b[dle_act_lang[3]]=function(){a(this).dialog("close")};b[dle_p_send]=function(){if(1>a("#dle-promt-text").val().length)a("#dle-promt-text").addClass("ui-state-error");
else{var b=a("#dle-promt-text").val(),c=a("#orfom").text();a(this).dialog("close");a("#dlepopup").remove();a.post(dle_root+"engine/ajax/complaint.php",{seltext:c,text:b,user_hash:dle_login_hash,action:"orfo",url:window.location.href},function(a){"ok"==a?DLEalert(dle_p_send_ok,dle_info):DLEalert(a,dle_info)})}};a("#dlepopup").remove();a("body").append("<div id='dlepopup' class='dle-promt' title='"+dle_orfo_title+"' style='display:none'><textarea name='dle-promt-text' id='dle-promt-text' class='ui-widget-content ui-corner-all' style='width:97%;height:80px;'></textarea><div id='orfom' style='display:none'>"+
c+"</div></div>");a("#dlepopup").dialog({autoOpen:!0,width:600,resizable:!1,dialogClass:"modalfixed dle-popup-complaint",buttons:b});a(".modalfixed.ui-dialog").css({position:"fixed"});a("#dlepopup").dialog("option","position",["0","0"])}});

Готово!
 
Версия DLE: 13.0
Автор: FastFud
Источник
Информация
Посетители, находящиеся в группе Гость, не могут оставлять комментарии к данной публикации.

Комментариев 2

Skater_1992 18 декабря 2023 01:13
Для версии DLE 17.0 в файле /engine/classes/js/dle_js.js найти и удалить:
.keydown(function(e){if(13==e.which&&e.ctrlKey){var t;if(e.preventDefault(),window.getSelection?t=window.getSelection():document.getSelection?t=document.getSelection():document.selection&&(t=document.selection.createRange().text),""==t)return!1;if(255<t.toString().length)return DLEalert(dle_big_text,dle_info),!1;e={};e[dle_act_lang[3]]=function(){n(this).dialog("close")},e[dle_p_send]=function(){var e,t,o;n("#dle-promt-text").val().length<1?n("#dle-promt-text").addClass("ui-state-error"):(e=n("#dle-promt-text").val(),t=n("#orfom").text(),o="",n("#dle-promt-mail").val()&&(o=n("#dle-promt-mail").val()),ShowLoading(""),n.post(dle_root+"engine/ajax/controller.php?mod=complaint",{seltext:t,text:e,mail:o,user_hash:dle_login_hash,action:"orfo",url:window.location.href},function(e){HideLoading(""),"ok"==e?(n("#dlecomplaint").remove(),DLEalert(dle_p_send_ok,dle_info)):DLEalert(e,dle_info)}))},n("#dlecomplaint").remove(),5==dle_group&&(i=dle_mail+'<br><input type="text"  dir="auto" name="dle-promt-mail" id="dle-promt-mail" class="ui-widget-content ui-corner-all" style="width:100%;" value="">'),n("body").append("<div id='dlecomplaint' class='dle-promt' title='"+dle_c_title+"' style='display:none'>"+dle_orfo_title+"<br><textarea dir='auto' name='dle-promt-text' id='dle-promt-text' class='ui-widget-content ui-corner-all' style='width:100%;height:140px;'></textarea>"+i+"<div id='orfom' style='display:none'>"+t+"</div></div>"),n("#dlecomplaint").dialog({autoOpen:!0,width:600,resizable:!1,dialogClass:"modalfixed dle-popup-complaint",buttons:e}),n(".modalfixed.ui-dialog").css({position:"fixed"}),n("#dlecomplaint").dialog("option","position",{my:"center",at:"center",of:window})}}),
Oxigen 5 июля 2022 07:30
Оставлю свой вариант комбинации отключения клавиш Ctrl+Enter. Открыть /engine/classes/js/dle_js.js и найти:
ctrlKey

Добавить единичку, чтобы получилось так:
ctrl1Key
--------------------
Всё, что вы напишите, будет использовано против вас при показе контекстной рекламы :)