Показать сообщение отдельно
  #11 (permalink)  
Старый 19.04.2018, 19:14
Интересующийся
Отправить личное сообщение для Nik123 Посмотреть профиль Найти все сообщения от Nik123
 
Регистрация: 14.08.2017
Сообщений: 12

Мой доработанный скрипт.
Вот немного доработанный мной вариант скрипта. Ссылки на каждом сайте будут подчеркиваться новым цветом!

// ==UserScript==
// @name         Underline_links
// @namespace    [url]http://tampermonkey.net/[/url]
// @version      0.1
// @description  try to take over the world!
// @author       You
// @include      [url]https://*[/url]
// @include      [url]http://*[/url]
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var i = Math.floor(Math.random()*8);
    var elem = document.createElement('style');
    switch (i) {
        case 0:
            elem.innerHTML ='a {line-height: 1 !important;display: inline-block !important;cursor: pointer;} a:after {display: block !important;position: relative !important;content: "" !important;height: 2px !important;width: 0% !important;background-color: red !important; transition: all .3s ease-in-out !important;left: 50% !important;} a:hover:after, a:focus:after {width: 100% !important;left:0% !important;} a:hover{text-decoration: none !important;}';
            break;
        case 1:
            elem.innerHTML ='a {line-height: 1 !important;display: inline-block !important;cursor: pointer;} a:after {display: block !important;position: relative !important;content: "" !important;height: 2px !important;width: 0% !important;background-color: orangered !important; transition: all .3s ease-in-out !important;left: 50% !important;} a:hover:after, a:focus:after {width: 100% !important;left:0% !important;} a:hover{text-decoration: none !important;}';
            break;
        case 2:
            elem.innerHTML ='a {line-height: 1 !important;display: inline-block !important;cursor: pointer;} a:after {display: block !important;position: relative !important;content: "" !important;height: 2px !important;width: 0% !important;background-color: yellowgreen !important; transition: all .3s ease-in-out !important;left: 50% !important;} a:hover:after, a:focus:after {width: 100% !important;left:0% !important;} a:hover{text-decoration: none !important;}';
            break;
        case 3:
            elem.innerHTML ='a {line-height: 1 !important;display: inline-block !important;cursor: pointer;} a:after {display: block !important;position: relative !important;content: "" !important;height: 2px !important;width: 0% !important;background-color: green !important; transition: all .3s ease-in-out !important;left: 50% !important;} a:hover:after, a:focus:after {width: 100% !important;left:0% !important;} a:hover{text-decoration: none !important;}';
            break;
        case 4:
            elem.innerHTML ='a {line-height: 1 !important;display: inline-block !important;cursor: pointer;} a:after {display: block !important;position: relative !important;content: "" !important;height: 2px !important;width: 0% !important;background-color: teal !important; transition: all .3s ease-in-out !important;left: 50% !important;} a:hover:after, a:focus:after {width: 100% !important;left:0% !important;} a:hover{text-decoration: none !important;}';
            break;
        case 5:
            elem.innerHTML ='a {line-height: 1 !important;display: inline-block !important;cursor: pointer;} a:after {display: block !important;position: relative !important;content: "" !important;height: 2px !important;width: 0% !important;background-color: aqua !important; transition: all .3s ease-in-out !important;left: 50% !important;} a:hover:after, a:focus:after {width: 100% !important;left:0% !important;} a:hover{text-decoration: none !important;}';
            break;
        case 6:
            elem.innerHTML ='a {line-height: 1 !important;display: inline-block !important;cursor: pointer;} a:after {display: block !important;position: relative !important;content: "" !important;height: 2px !important;width: 0% !important;background-color: deepskyblue !important; transition: all .3s ease-in-out !important;left: 50% !important;} a:hover:after, a:focus:after {width: 100% !important;left:0% !important;} a:hover{text-decoration: none !important;}';
            break;
        case 7:
            elem.innerHTML ='a {line-height: 1 !important;display: inline-block !important;cursor: pointer;} a:after {display: block !important;position: relative !important;content: "" !important;height: 2px !important;width: 0% !important;background-color: fuchsia !important; transition: all .3s ease-in-out !important;left: 50% !important;} a:hover:after, a:focus:after {width: 100% !important;left:0% !important;} a:hover{text-decoration: none !important;}';
    };
    document.head.appendChild(elem);
})();
Ответить с цитированием