2014-02-13 9 views
0

img 태그 안에있는 이미지와 같은 HTML attribute을 편집하고 userscript로 다른 이미지로 이미지를 전환 할 수 있습니까? 나는 usercript가 아닌 userstyle을 만드는 법만 알고 있습니다.img 태그의 이미지를 userscript로 편집 하시겠습니까?

여기까지 시도했지만, 효과가 없습니다.

// ==UserScript== 
// @name  Steam* 
// @namespace http://userscripts.org/user/erraticfox 
// @description %description% 
// @include  http://store.steampowered.com/ 
// @exclude  %exclude% 
// @version  1 
// @grant  none 
// ==/UserScript== 


document.getElementById('#logo_holder img').src = 'http://i.imgur.com/ytgtQME.png' !important; 
+0

@BrockAdams - 내 답변이 업데이트되었습니다. – ErraticFox

답변

1

위의 질문에있는 세부 정보가 정확하다고 가정하면 다음과 같이 처리해야합니다.

document.getElementById("logo_holder").src="http://i.imgur.com/ytgtQME.png";