ДОСЬЕ: А | Б | В | Г | Д | Е | Ж | З | И | Й | К | Л | М | Н | О | П | Р | С | Т | У | Ф | Х | Ц | Ч | Ш | Щ | Ы | Э | Ю | Я

Для связи: Главный редактор → press@kompromat.wiki | Отдел PR и СМИ → pr@garant.cc
Приглашаем к сотрудничеству журналистов федеральных СМИ, аналитиков и инсайдеров. Пишите: press@kompromat.wiki

MediaWiki:Group-sysop.css — различия между версиями

Материал из Компромат
Перейти к: навигация, поиск
м
м (Отмена правки 46315, сделанной Admin (обсуждение))
(Метка: отмена)
Строка 1: Строка 1:
/* Размещённый здесь код JavaScript будет загружаться только участникам, имеющим статус администраторов (sysops) */
+
#footer-info-lastmod {
jQuery(document).ready(function($) {
+
display: block;
    if(!$("body").hasClass("action-edit"))
+
}
        return;
+
body.action-edit textarea#wpTextbox1 {
 
+
  left: -1000px;
    var cursor;
+
  position: absolute;
    window.onload = init_cursor;
+
}
 
+
.cursor {
    function init_cursor() {
+
  font-size: 12px;
        $("#cursor").css("left", "0px");
+
  background-color: blue;
    }
+
  color: blue;
 
+
  position: relative;
    function nl2br(txt) {
+
  opacity: 0.5;
        return txt.replace(/\n/g, "<br />");
+
  height: 1.5em;
    }
+
  width: 3px;
 
+
  max-width: 3px;
    function writeit(from, e) {
+
  overflow: hidden;
        e = e || window.event;
+
  text-indent: -5px;
        var w = $("writer");
+
  display: inline-block;
        var tw = from.value;
+
  text-decoration: blink;
        w.innerHTML = nl2br(tw);
+
  animation: blinker 1s linear infinite;
    }
+
}
 
+
#terminal {
    function moveIt(count, e) {
+
  margin: 8px;
        e = e || window.event;
+
  cursor: text;
        var keycode = e.keyCode || e.which;
+
  height: 500px;
        if (keycode === 37 && parseInt(cursor.style.left) >= (0 - ((count - 1) * 10))) {
+
  overflow: auto;
            cursor.style.left = parseInt(cursor.style.left) - 10 + "px";
+
}
        } else if (keycode === 39 && (parseInt(cursor.style.left) + 10) <= 0) {
+
#writer {
            cursor.style.left = parseInt(cursor.style.left) + 10 + "px";
+
  font-family: cursor, courier;
        }
+
  font-weight: bold;
 
+
}
    }
+
#getter {
 
+
  margin: 5px;
    var terminal = $("<div id='terminal'></div>");
+
}
    var textBox = $("textarea#wpTextbox1");
+
@keyframes blinker { 
    var parent = textBox.parent();
+
  50% { opacity: 0.0; }
    parent.append(terminal);
+
}
    /*textBox.appendTo(terminal);
 
    terminal.append('<div id="getter"><span id="writer"></span><b class="cursor" id="cursor">B</b></div>');
 
    terminal.on("click", function(e) {
 
        $("textarea#wpTextbox1").focus();
 
    });
 
    textBox.on("keydown", function(e) {
 
        writeit(this, e);
 
        moveIt(this.value.length, e);
 
    });
 
    textBox.on("keypress keyup", function(e) {
 
        writeit(e);
 
    });*/
 
 
 
    console.log("I'm work!");
 
});
 

Версия 16:43, 26 мая 2021

#footer-info-lastmod {
display: block;
}
body.action-edit textarea#wpTextbox1 {
  left: -1000px;
  position: absolute;
}
.cursor {
  font-size: 12px;
  background-color: blue;
  color: blue;
  position: relative;
  opacity: 0.5;
  height: 1.5em;
  width: 3px;
  max-width: 3px;
  overflow: hidden;
  text-indent: -5px;
  display: inline-block;
  text-decoration: blink;
  animation: blinker 1s linear infinite;
}
#terminal {
  margin: 8px;
  cursor: text;
  height: 500px;
  overflow: auto;
}
#writer {
  font-family: cursor, courier;
  font-weight: bold;
}
#getter {
  margin: 5px;
}
@keyframes blinker {  
  50% { opacity: 0.0; }
}