Change random images

43 views
Skip to first unread message

Sertaç Kılıçdoğan

unread,
Nov 1, 2012, 8:55:33 AM11/1/12
to greasemon...@googlegroups.com

<script type="text/javascript">
function reloadImage(img) {
var now = new Date();
img.src = "/sources/?id=" + now.getTime();
}
</script>

<img id="refimg" onclick="reloadImage(this)" title="" src="/sources/?id=1351769759" style="height: 180px; width: 300px; cursor: pointer;">



when i refresh or connect page; change image source. how can i save this source "1351769759" i want use always it.  

Klaus Johannes Rusch

unread,
Nov 1, 2012, 9:02:14 AM11/1/12
to greasemon...@googlegroups.com
On 01.11.2012 14:55, Sertaç Kılıçdoğan wrote:
<img id="refimg" onclick="reloadImage(this)" title="" src="/sources/?id=1351769759" style="height: 180px; width: 300px; cursor: pointer;">

when i refresh or connect page; change image source. how can i save this source "1351769759" i want use always it. 
Option 1:  Turn off Javascript when loading this page
Option 2:  Open the image URL directly in your browser
Option 3:  Write a GM script that disables onclick and sets the src back:

var img = document.getElementbyId("refimg");
img.onclick="return true";
img.src = "/sources/?id=1351769759";


-- 
Klaus Johannes Rusch
klaus...@atmedia.net
http://klausrusch.atmedia.net/
Reply all
Reply to author
Forward
0 new messages