Skip to content

Commit

Permalink
Fix eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
orestbida committed May 21, 2023
1 parent bd1a623 commit 2060ba6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion dist/iframemanager.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions src/iframemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
const btn = createNode('button');
btn.type = 'button';
return btn;
}
};

/**
* @param {HTMLElement} el
Expand Down Expand Up @@ -181,8 +181,8 @@
*/
const setIframeAttributes = (iframe, attrs) => {
for(const key in attrs)
setAttribute(iframe, key, attrs[key])
}
setAttribute(iframe, key, attrs[key]);
};

/**
* @param {HTMLDivElement} serviceDiv
Expand Down Expand Up @@ -265,7 +265,7 @@
const img = new Image();
img.onload = () => addClass(serviceProp._backgroundDiv, 'loaded');
img.src = src;
}
};

// Set custom thumbnail if provided
if(isString(serviceProp._thumbnail)){
Expand Down Expand Up @@ -355,7 +355,7 @@
if(iframeParams && isString(iframeParams)){
src += iframeParams.slice(0, 1) === '?'
? iframeParams
: `?${iframeParams}`
: `?${iframeParams}`;
}

// When iframe is loaded => hide background image
Expand Down Expand Up @@ -390,7 +390,7 @@
const setAttribute = (el, attrKey, attrValue) => {
if(!disallowedProps.includes(attrKey))
el.setAttribute(attrKey, attrValue);
}
};

/**
* Remove iframe HTMLElement from div
Expand Down Expand Up @@ -429,9 +429,9 @@
* @returns {string} cookie value
*/
const getCookie = (a) => {
return (a = doc.cookie.match(`(^|;)\\s*${a}\\s*=\\s*([^;]+)`))
? a.pop()
: '';
a = doc.cookie.match(`(^|;)\\s*${a}\\s*=\\s*([^;]+)`);

return a ? a.pop() : '';
};

/**
Expand Down Expand Up @@ -520,11 +520,11 @@
setClassName(load_button, 'c-l-b');

load_button.addEventListener(CLICK_EVENT_SOURCE, showVideo);
appendChild(buttons, load_button)
appendChild(buttons, load_button);
}

if(loadAllBtnText){
const load_all_button = createButton()
const load_all_button = createButton();
load_all_button.textContent = loadAllBtnText;
setClassName(load_all_button, loadBtnText ? 'c-la-b' : 'c-l-b');

Expand Down Expand Up @@ -565,7 +565,7 @@
}

appendChild(notice_text, fragment_2);
notice && notice_text.insertAdjacentHTML('beforeend', noticeText || "");
notice && notice_text.insertAdjacentHTML('beforeend', noticeText || '');
appendChild(span, notice_text);

setClassName(notice_text_container, 'c-t-cn');
Expand Down Expand Up @@ -643,7 +643,7 @@
}

serviceObservers[serviceName].observe(div);
}
};

serviceProps.forEach((serviceProp) => {
if(!serviceProp._hasIframe)
Expand Down Expand Up @@ -740,7 +740,7 @@
},
changedServices
});
}
};

const api = {

Expand Down Expand Up @@ -851,7 +851,7 @@
getState: () => ({
services: new Map(servicesState),
acceptedServices: [...servicesState]
.filter(([name, value]) => !!value)
.filter(([, value]) => !!value)
.map(([name]) => name)
}),

Expand Down

0 comments on commit 2060ba6

Please sign in to comment.