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/captcha-reload.js

21 lines
381 B
JavaScript
Raw Normal View History

2016-05-22 10:51:12 +05:00
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(){
document.getElementById("captcha_img").onclick = function() {
reload(document.getElementById("captcha_img"));
};
});