mirror of
https://github.com/Mibew/advanced-button-plugin.git
synced 2025-01-22 17:00:30 +03:00
Make plugin compatible with tracking for all types of button
This commit is contained in:
parent
52c54dd5a5
commit
bbeda61ab3
@ -1,7 +1,10 @@
|
||||
(function(Mibew) {
|
||||
Mibew.APIFunctions.refreshButton = function(data) {
|
||||
// Refresh the button image
|
||||
var img = document.getElementById("mibew-agent-button").getElementsByTagName("img")[0];
|
||||
// Refresh the button image (if exists)
|
||||
var button = document.getElementById("mibew-agent-button");
|
||||
if (!button) { return; }
|
||||
var img = button.getElementsByTagName("img")[0];
|
||||
if (!img) { return; }
|
||||
var originalSrc = img.src.replace(/&dummy=\d+/, '');
|
||||
img.src = originalSrc + "&dummy=" + (new Date()).getTime();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user