From 8e101ab95659696d83f82c4ff7b7d92e60fce13e Mon Sep 17 00:00:00 2001 From: Michael Save Date: Thu, 15 Mar 2012 04:55:59 +1100 Subject: [PATCH] banner-reload-helper.js --- js/banner-reload-helper.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 js/banner-reload-helper.js diff --git a/js/banner-reload-helper.js b/js/banner-reload-helper.js new file mode 100644 index 00000000..22d2106c --- /dev/null +++ b/js/banner-reload-helper.js @@ -0,0 +1,21 @@ +/* + * banner-reload-helper.js + * https://github.com/savetheinternet/Tinyboard-Tools/blob/master/js/banner-reload-helper.js + * + * For 4chon. + * + * Released under the MIT license + * Copyright (c) 2012 Michael Save + * + * Usage: + * $config['additional_javascript'][] = $config['root'] . 'banner-reload-helper.js'; + * + */ + +$(document).ready(function(){ + var img = document.getElementsByTagName('img')[0]; + if(img.className != 'banner') + return; + img.src = img.src + '?' + new Date().getTime(); +}); +