From 3f28f01b0ebaf3c7a78c44daf30b55a184327059 Mon Sep 17 00:00:00 2001 From: Alexander Do Date: Mon, 9 Apr 2018 15:57:58 +0000 Subject: [PATCH] Switch from bind / unbind to on / off --- js/privatebin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/privatebin.js b/js/privatebin.js index 9b1f33f..c453788 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -1928,7 +1928,7 @@ jQuery.PrivateBin = (function($, sjcl, Base64, RawDeflate) { // IE does not support setting a data URI on an a element // Convert dataURI to a Blob and use msSaveBlob to download if (window.Blob && navigator.msSaveBlob) { - $attachmentLink.bind('click', function () { + $attachmentLink.off('click').on('click', function () { // data URI format: data:[][;base64], // position in data URI string of where data begins @@ -2001,7 +2001,7 @@ jQuery.PrivateBin = (function($, sjcl, Base64, RawDeflate) { me.hideAttachmentPreview(); $attachmentLink.prop('href', ''); $attachmentLink.prop('download', ''); - $attachmentLink.unbind('click'); + $attachmentLink.off('click'); $attachmentPreview.html(''); };