diff options
| author | 2016-10-10 21:57:33 +0200 | |
|---|---|---|
| committer | 2016-10-10 21:57:33 +0200 | |
| commit | 189692e6adea2acb098bae5bc9ce75844080d040 (patch) | |
| tree | 1244ce593620a13e6c3a12af642eedd22ca55cad /p/scripts | |
| parent | c5c3011edfb93662cf1208ff38a26a781634c998 (diff) | |
Fix bug share
https://github.com/FreshRSS/FreshRSS/issues/1289
Was using deprecated non-standard parameter in string.replace()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Firefox-specific_notes
Diffstat (limited to 'p/scripts')
| -rw-r--r-- | p/scripts/main.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index 3c0a36629..d42704f7a 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -1153,10 +1153,10 @@ function init_share_observers() { $('.share.add').on('click', function(e) { var opt = $(this).siblings('select').find(':selected'); var row = $(this).parents('form').data(opt.data('form')); - row = row.replace('##label##', opt.html().trim(), 'g'); - row = row.replace('##type##', opt.val(), 'g'); - row = row.replace('##help##', opt.data('help'), 'g'); - row = row.replace('##key##', shares, 'g'); + row = row.replace(/##label##/g, opt.html().trim()); + row = row.replace(/##type##/g, opt.val()); + row = row.replace(/##help##/g, opt.data('help')); + row = row.replace(/##key##/g, shares); $(this).parents('.form-group').before(row); shares++; |
