Skip to content

Commit 8cc942f

Browse files
committed
Remove unnecessary variable redefinition
1 parent d624484 commit 8cc942f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

js/content-script.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,10 @@ var observer = new MutationObserver(function (mutations) {
325325
if (DEBUG)
326326
console.log('ViewImage: Mutations detected: ', mutations);
327327

328+
var node;
328329
for (var mutation of mutations) {
329330
if (mutation.addedNodes && mutation.addedNodes.length > 0) {
330-
for (var node of mutation.addedNodes) {
331+
for (node of mutation.addedNodes) {
331332
if (node.classList) {
332333
// Check for new image nodes
333334
if (['irc_mi', 'irc_mut', 'irc_ris', 'n3VNCb'].some(className => node.classList.contains(className))) {
@@ -338,7 +339,7 @@ var observer = new MutationObserver(function (mutations) {
338339
}
339340

340341
if (mutation.target.classList && mutation.target.classList.contains('n3VNCb')) {
341-
var node = mutation.target.closest('.tvh9oe');
342+
node = mutation.target.closest('.tvh9oe');
342343

343344
if (!node.hasAttribute('aria-hidden')) {
344345
addLinks(node);

0 commit comments

Comments
 (0)