
15.11.2022, 16:23
|
|
Постоянный
Регистрация: 19.03.2013
Сообщений: 586
С нами:
6920791
Репутация:
113
|
|
Сообщение от sep
спасибо но не пашет делал так
var element = document.getElementsByClassName("profile-body-level-info-progress").getElementsByTagName('div')
element.style.background="#00ff00";
если меняю в как на фото работает а в скрипте нет
полный скрин
если делаю так document.getElementsByClassName("profile-body-level-info-progress")[0].style.background='#00ff00'; то
МЕНЯЕТСЯ НЕ ТО ЧТО Я ХОЧУ
И ДА СКРИПТ РАБОТАЕТ ТОЛЬКО КОГДА ПЕРЕЗАГРУЖАЮ СТРАНИЧКУ
Сообщение от Спойлер
ФУЛЛ КОД:
Код:
// ==UserScript==
// @name lip-monopoly-one
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author lip
// @match https://monopoly-one.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
'use strict'
;
// Your code here...
document
.
getElementsByClassName
(
"_img"
)
[
0
]
.
style
.
backgroundImage
=
"url('https://i.imgur.com/su4kW3N.png')"
;
//
document
.
getElementsByClassName
(
"profile-top-info-main-nick"
)
[
0
]
.
style
.
color
=
'#00ff00'
;
document
.
getElementsByClassName
(
"title title-3"
)
[
0
]
.
style
.
color
=
'ff0000'
;
document
.
getElementsByClassName
(
"profile-body-level-info-rank"
)
[
0
]
.
style
.
color
=
'#ff0000'
;
document
.
getElementsByClassName
(
"profile-top-stat"
)
[
0
]
.
style
.
color
=
'#ffffff'
;
//
//document.getElementsByClassName("profile-body-level-info-progress").getElementsByTagName('div').style.background='#00ff00';
//
var
element
=
document
.
getElementsByClassName
(
"profile-body-level-info-progress"
)
.
getElementsByTagName
(
'div'
)
;
element
.
style
.
background
=
"#00ff00"
;
JavaScript :
Код:
// ==UserScript==
// @name lip-monopoly-one
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author lip
// @match https://monopoly-one.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
'use strict'
;
// Your code here...
document
.
getElementsByClassName
(
"_img"
)
[
0
]
.
style
.
backgroundImage
=
"url('https://i.imgur.com/su4kW3N.png')"
;
//
document
.
getElementsByClassName
(
"profile-top-info-main-nick"
)
[
0
]
.
style
.
color
=
'#00ff00'
;
document
.
getElementsByClassName
(
"title title-3"
)
[
0
]
.
style
.
color
=
'ff0000'
;
document
.
getElementsByClassName
(
"profile-body-level-info-rank"
)
[
0
]
.
style
.
color
=
'#ff0000'
;
document
.
getElementsByClassName
(
"profile-top-stat"
)
[
0
]
.
style
.
color
=
'#ffffff'
;
//
//document.getElementsByClassName("profile-body-level-info-progress").getElementsByTagName('div').style.background='#00ff00';
//
var
element
=
document
.
getElementsByClassName
(
"profile-body-level-info-progress"
)
.
item
(
0
)
.
getElementsByTagName
(
'div'
)
.
item
(
0
)
;
element
.
style
.
background
=
"#00ff00"
;
|
|
|