ウェブサイトの背景を変更したいと思います。問題は、Greasemonkeyの経験がほとんどないことです。私はこのスクリプトを持っている:Greasemonkeyで背景画像を変更しますか?
// ==UserScript==
// @name Tamo
// @namespace TamoImageChanger
// @include https://sistema.tamo.lt*
// @version 1
// @grant none
// ==/UserScript==
var images = document.getElementsByTagName("img");
var x = 0;
while (x < images.length) {
if (images[x].src == "https://sistema.tamo.lt/Content/img/new/login_background2.jpg") {
images[x].src = "the image i want to be displayed";
}
x = x + 1;
}
を私は、このWebページにいるときにのみ動作します:
https://sistema.tamo.lt/Content/img/new/login_background2.jpg
私はスクリプトはいえ、このWebページで背景を変更したい:
https://sistema.tamo.lt/Prisijungimas/Login
または、 '' GM_addStyle() '](https://wiki.greasespot.net/GM_addStyle)、[[スタイリッシュアドオン](https://userstyles.org/) div [style * = 'login_background2.jpg'] {背景画像:URL( 'あなたの画像を挿入する')!重要;} '。 –
これは興味深いコメントです。しばらく私はGMを使用していなかったので、私はその結果について確信しています。 GM_addStyleで回答を編集するつもりですありがとう! –
ありがとうございました!このスクリプトは完璧に動作します! – Mantvydas