Skip to content

Commit

Permalink
Remove constant definition from global scope in embed.js (mastodon#33107
Browse files Browse the repository at this point in the history
)
  • Loading branch information
YKWeyer authored Nov 29, 2024
1 parent c58967c commit 4635ce2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions public/embed.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
// @ts-check

const allowedPrefixes = (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.dataset.allowedPrefixes) ? document.currentScript.dataset.allowedPrefixes.split(' ') : [];

(function () {
(function (allowedPrefixes) {
'use strict';

/**
Expand Down Expand Up @@ -127,4 +124,4 @@ const allowedPrefixes = (document.currentScript && document.currentScript.tagNam
container.appendChild(iframe);
});
});
})();
})((document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.dataset.allowedPrefixes) ? document.currentScript.dataset.allowedPrefixes.split(' ') : []);

0 comments on commit 4635ce2

Please sign in to comment.