【发布时间】:2014-02-13 02:43:07
【问题描述】:
是否可以编辑HTML attribute(例如img 标记内的图像)并将图像与另一个带有用户脚本的图像切换?我只知道如何制作用户样式而不是用户脚本。
这是我迄今为止尝试过的方法,但没有奏效。
// ==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;
【问题讨论】:
-
@BrockAdams - 更新了我的答案。
标签: css userscripts