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
2016-05-22 07:51:12 +02:00

21 lines
381 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(){
document.getElementById("captcha_img").onclick = function() {
reload(document.getElementById("captcha_img"));
};
});