NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Elite-games advanced script
// @namespace elite-games.ru
// @description Пока только изменения некоторых стилей
// @description http://www.elite-games.ru/conference/viewtopic.php?t=64583
// @include *elite-games.ru*
// @version 0.1
// @author AntiUser (https://openuserjs.org/users/AntiUser)
// @grant none
// ==/UserScript==
/* RELEASE NOTES
0.1.0
+ Добавлены первые стили
*/
(function(){
'use strict';
addNewCSSClasses();
function newCssClass(cssClass){
const head = document.head || document.getElementsByTagName('head')[0];
const style = document.createElement('style');
style.type = 'text/css';
if(style.styleSheet){
style.styleSheet.cssText = cssClass;
}else{
style.appendChild(document.createTextNode(cssClass));
}
head.appendChild(style);
}
function addNewCSSClasses(){
newCssClass(`
/* замена общего бэкграунда (отличного от белого) */
tr[bgcolor="#CCCCFF"], td[bgcolor="#CCCCFF"]{
background-color: #e5e5e5;
}
/* бэкгроунд для шапки спойлера */
div[style*="#ccccff"]{
background-color: #d0d0d0 !important;
}
/* бордер для кнопок и полей ввода */
.blue, .blue_s, div input, .blue_input, .blue_border, .blue_border_s{
border-color: #bfbfbf;
border-radius: 3px;
}
/* размер строк тредов в конфе*/
body > table:nth-child(33) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > form:nth-child(n+4) > table:nth-child(n+1) > tbody:nth-child(1) tr:nth-child(n+2):not(:last-child){
height: 26px;
}
/* бекгроунд для нечетных строк*/
body > table:nth-child(33) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > form:nth-child(n+4) > table:nth-child(n+1) > tbody:nth-child(1) tr:nth-child(n+2):nth-child(odd):not(:last-child){
background: #f5f5f5;
}
/* размер строк (второй для результатов поиска)*/
body > table:nth-child(33) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > form:nth-child(n+4) > table:nth-child(n+1) > tbody:nth-child(1) tr:nth-child(n+3):not(:last-child):hover{
background: #f0f0f0;
}
/* выравнивание для колонки с датой */
body > table:nth-child(33) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > form:nth-child(4) > table:nth-child(n+1) > tbody:nth-child(1) > tr:nth-child(n+3) > td:nth-child(7),
body > table:nth-child(33) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table:nth-child(5) > tbody:nth-child(1) > tr:nth-child(n+2) > td:nth-child(8){
text-align: right;
padding-right: 30px;
}
/* размер фонта для колонки с датой */
body > table:nth-child(33) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > form:nth-child(4) > table:nth-child(n+1) > tbody:nth-child(1) > tr:nth-child(n+3) > td:nth-child(7) font,
body > table:nth-child(33) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table:nth-child(5) > tbody:nth-child(1) > tr:nth-child(n+2) > td:nth-child(8) > font{
font-size: 85%;
}
/* для колонок с юзернаймом убрать наклон нах */
body > table:nth-child(33) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > form:nth-child(4) > table:nth-child(n+1) > tbody:nth-child(1) > tr:nth-child(n+3) > td:nth-child(n+4) > b:nth-child(1) > i:nth-child(1),
body > table:nth-child(33) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table:nth-child(5) > tbody:nth-child(1) > tr:nth-child(n+2) > td:nth-child(n+5) > b:nth-child(1) > i:nth-child(1){
font-style: normal;
}
/* бекгроунд юзеринфы в треде */
body > table:nth-child(33) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table:nth-child(5) > tbody:nth-child(1) > tr:nth-child(3n+5) > td:nth-child(1){
background-color: #e4e4e4;
}
/* разделитель постов в треде */
body > table:nth-child(33) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table:nth-child(5) > tbody:nth-child(1) > tr:nth-child(3n+4) > td:nth-child(1){
background-image: none;
background-color: #c2c2c2;
height: 1px;
}
/* цитирование в посте */
.quote {
background-color: #f3f3f3;
border-color: #bfbfbf;
border-radius: 5px;
}
/* textarea быстрого ответа на 80% от экрана */
table.forumline > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) {
width: 80%;
}
textarea.blue_border {
width: 99%;
}
/* форма ответа на растягивается по размеру экрана */
table.forumline > tbody:nth-child(1) > tr:nth-child(2) > td:nth-child(1){
width: 17%;
}
table.forumline > tbody:nth-child(1) > tr:nth-child(n+3) > td:nth-child(1){
width: auto;
}
table.forumline input.blue_input{
width: 99% !important;
}
table.forumline > tbody:nth-child(1) > tr:nth-child(n+4) > td:nth-child(2) > table:nth-child(1){
width: 100%;
}
table.forumline > tbody:nth-child(1) > tr:nth-child(n+4) > td:nth-child(2) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1){
display: table;
}
table.forumline > tbody:nth-child(1) > tr:nth-child(n+4) > td:nth-child(2) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(5) > td:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > input.blue{
width: 100% !important;
}
table.forumline > tbody:nth-child(1) > tr:nth-child(n+4) > td:nth-child(2) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(6) > td:nth-child(1) > textarea.blue_border {
width: 99% !important;
}
`);
}
}());