Archived
1
0
This repository has been archived on 2023-08-12. You can view files and clone it, but cannot push or open issues or pull requests.
nntpchan/contrib/js/nntpchan/captcha-reload.js
Jeff Becker 7f25dcf95c
broken
2016-11-04 08:45:06 -04:00

24 lines
379 B
JavaScript

function setSrcQuery(e, q) {
var src = e.src;
var p = src.indexOf('?');
if (p >= 0) {
src = src.substr(0, p);
}
e.src = src + "?" + q
}
function reload(el) {
setSrcQuery(el, "reload=" + (new Date()).getTime());
return false;
}
onready(function(){
var e = document.getElementById("captcha_img");
if (e) {
e.onclick = function() {
reload(e);
};
}
});