Skip to content

Commit c9b495d

Browse files
authored
Merge pull request #154 from FriendsOfREDAXO/multi_copy
fixed observer conflict
2 parents 73c62cf + 0be0d74 commit c9b495d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

assets/js/bloecks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ $(document).on('pjax:complete pjax:end rex:ready', function() {
10551055

10561056
// Fallback: Watch for new bloecks buttons being added to DOM
10571057
if (typeof MutationObserver !== 'undefined') {
1058-
var observer = new MutationObserver(function(mutations) {
1058+
var bloecksObserver = new MutationObserver(function(mutations) {
10591059
var shouldReinit = false;
10601060
mutations.forEach(function(mutation) {
10611061
if (mutation.type === 'childList') {
@@ -1078,7 +1078,7 @@ if (typeof MutationObserver !== 'undefined') {
10781078
// Start observing only when document.body is available
10791079
function startObserving() {
10801080
if (document.body) {
1081-
observer.observe(document.body, {
1081+
bloecksObserver.observe(document.body, {
10821082
childList: true,
10831083
subtree: true
10841084
});

0 commit comments

Comments
 (0)