Index: static/js/address-masking.js |
=================================================================== |
--- a/static/js/address-masking.js |
+++ b/static/js/address-masking.js |
@@ -14,22 +14,26 @@ |
* |
* You should have received a copy of the GNU General Public License |
* along with website-defaults. If not, see <http://www.gnu.org/licenses/>. |
*/ |
var ADDRESS_MASKING_DELAY = 250; |
function unmaskAddress(target) |
{ |
- target.href = atob(target.getAttribute("data-address")); |
- target.removeAttribute("data-address"); |
+ var attributes = JSON.parse(target.getAttribute("data-mask")); |
+ |
+ for (var attr in attributes) |
+ target[attr] = atob(attributes[attr]); |
+ |
+ target.removeAttribute("data-mask"); |
} |
document.addEventListener("DOMContentLoaded", function() |
{ |
var unmaskAfterTimeout = setTimeout.bind( |
this, |
unmaskAddress, |
ADDRESS_MASKING_DELAY |
); |
- document.querySelectorAll("[data-address]").forEach(unmaskAddress); |
+ document.querySelectorAll("[data-mask]").forEach(unmaskAddress); |
}); |