mirror of
https://github.com/olegvodyanov/instalinks.git
synced 2025-12-20 04:37:04 +03:00
fix
This commit is contained in:
parent
b732d0b6b9
commit
097c5c2710
@ -55,18 +55,18 @@ function renderPaginatedList(linkList, container, isWatched, page, totalPages) {
|
||||
linkList
|
||||
.filter(link => link.watched === isWatched)
|
||||
.forEach(link => {
|
||||
const col = document.createElement('div');
|
||||
col.className = 'col-12 col-sm-6 col-md-4 col-lg-3';
|
||||
col.appendChild(createLinkElement(link, isWatched));
|
||||
row.appendChild(col);
|
||||
const column = document.createElement('div');
|
||||
column.className = 'col-12 col-sm-6 col-md-4 col-lg-3';
|
||||
column.appendChild(createLinkElement(link, isWatched));
|
||||
row.appendChild(column);
|
||||
});
|
||||
|
||||
container.appendChild(row);
|
||||
|
||||
// Pagination controls
|
||||
if (totalPages > 1) {
|
||||
const nav = document.createElement('div');
|
||||
nav.className = 'd-flex justify-content-center mt-4 gap-2';
|
||||
const navigation = document.createElement('div');
|
||||
navigation.className = 'd-flex justify-content-center mt-4 gap-2';
|
||||
|
||||
const prevBtn = document.createElement('button');
|
||||
prevBtn.innerText = '← Previous';
|
||||
@ -86,9 +86,9 @@ function renderPaginatedList(linkList, container, isWatched, page, totalPages) {
|
||||
loadLinks();
|
||||
};
|
||||
|
||||
nav.appendChild(prevBtn);
|
||||
nav.appendChild(nextBtn);
|
||||
container.appendChild(nav);
|
||||
navigation.appendChild(prevBtn);
|
||||
navigation.appendChild(nextBtn);
|
||||
container.appendChild(navigation);
|
||||
}
|
||||
|
||||
reinitializeInstagramEmbeds();
|
||||
@ -108,18 +108,17 @@ function createLinkElement(link, isWatched) {
|
||||
// Clean iframe embed
|
||||
const iframeWrapper = document.createElement('div');
|
||||
iframeWrapper.style.width = '100%';
|
||||
iframeWrapper.style.height = '400px';
|
||||
iframeWrapper.style.height = '600px';
|
||||
iframeWrapper.style.overflow = 'hidden';
|
||||
iframeWrapper.style.borderRadius = '10px';
|
||||
|
||||
const iframe = document.createElement('iframe');
|
||||
iframe.src = `https://www.instagram.com/reel/${reelId}/embed`;
|
||||
iframe.width = '100%';
|
||||
iframe.height = '600'; // taller to allow for cropping
|
||||
iframe.height = '700'; // taller to allow for cropping
|
||||
iframe.style.border = 'none';
|
||||
iframe.allowFullscreen = true;
|
||||
iframe.allow="fullscreen";
|
||||
iframe.loading = 'lazy';
|
||||
iframe.style.marginTop = '-100px'; // shift to crop comments/likes
|
||||
|
||||
iframeWrapper.appendChild(iframe);
|
||||
wrapper.appendChild(iframeWrapper);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user