MediaWiki:Gadget-blamefinder.js: различия между версиями

Нет описания правки
Нет описания правки
Строка 116: Строка 116:


     function createSafeLink(url, text, title) {
     function createSafeLink(url, text, title) {
        // [FIX 4] Используем sanitizeUrl вместо проверки через includes().
         var safeUrl = sanitizeUrl(url) || '#';
         var safeUrl = sanitizeUrl(url) || '#';


Строка 617: Строка 616:
                 timer = null;
                 timer = null;
             }
             }
            // [FIX 6] очищаем и setTimeout
 
             if (selectionTimer) {
             if (selectionTimer) {
                 clearTimeout(selectionTimer);
                 clearTimeout(selectionTimer);
Строка 660: Строка 659:
         document.addEventListener('touchend', touchHandler);
         document.addEventListener('touchend', touchHandler);


        // [FIX 6] сохраняем id таймера в модульную переменную, cleanup его снимет
         selectionTimer = setTimeout(function() {
         selectionTimer = setTimeout(function() {
             if (selectionActive) {
             if (selectionActive) {