esifawafwu
This commit is contained in:
@@ -1455,7 +1455,7 @@
|
||||
${item.is_external && item.external_board && item.external_tid
|
||||
? `<a class="scroll-id-link" href="https://boards.4chan.org/${item.external_board}/thread/${item.external_tid}#p${item.external_id}" target="_blank">/${item.external_board}/thread/${item.external_tid}</a>`
|
||||
: (item.local_id
|
||||
? `<a class="scroll-id-link" href="/${item.local_id}" target="_blank">#${item.local_id}</a>`
|
||||
? `<a class="scroll-id-link" href="/${item.local_path || item.local_id}" target="_blank">/${item.local_path || item.local_id}</a>`
|
||||
: `<a class="scroll-id-link" href="/abyss/${item.id}">#${item.id}</a>`)}
|
||||
</div>`;
|
||||
slide.appendChild(meta);
|
||||
@@ -1486,7 +1486,7 @@
|
||||
</button>
|
||||
${item.is_external ? (
|
||||
item.local_id
|
||||
? `<a class="scroll-btn rehost-btn success" href="/${item.local_id}" target="_blank" title="${_i.already_added || 'Already added'}">
|
||||
? `<a class="scroll-btn rehost-btn success" href="/${item.local_path || item.local_id}" target="_blank" title="${_i.already_added || 'Already added'}">
|
||||
<div class="scroll-btn-icon"><i class="fa-solid fa-check"></i></div>
|
||||
<span class="scroll-btn-label">${_i.view_label || 'View'}</span>
|
||||
</a>`
|
||||
@@ -1761,6 +1761,7 @@
|
||||
|
||||
const external_media_url = `https://i.4cdn.org/${data.board}/${p.tim}${ext}`;
|
||||
const local_id = allRehosts[external_media_url] || null;
|
||||
const local_path = (local_id && data.rehost_paths && data.rehost_paths[local_id]) || local_id;
|
||||
|
||||
return {
|
||||
id: `${data.board}/${p.no}`,
|
||||
@@ -1770,6 +1771,7 @@
|
||||
external_source: '4chan',
|
||||
is_external: true,
|
||||
local_id,
|
||||
local_path,
|
||||
external_media_url,
|
||||
mime: isVideo ? 'video/unknown' : (isImage ? 'image/unknown' : 'application/octet-stream'),
|
||||
dest: `/api/v2/scroller/external/4chan/${data.board}/media/${p.tim}${ext}`,
|
||||
@@ -1972,7 +1974,7 @@
|
||||
// Update button to link to the new site-internal post
|
||||
setTimeout(() => {
|
||||
btn.outerHTML = `
|
||||
<a href="/${data.item_id}" target="_blank" class="scroll-btn rehost-btn success" style="text-decoration:none;">
|
||||
<a href="/${data.item_path || data.item_id}" target="_blank" class="scroll-btn rehost-btn success" style="text-decoration:none;">
|
||||
<div class="scroll-btn-icon"><i class="fa-solid fa-arrow-up-right-from-square"></i></div>
|
||||
<span class="scroll-btn-label">View</span>
|
||||
</a>
|
||||
@@ -1983,8 +1985,8 @@
|
||||
if (slide) {
|
||||
const idLink = slide.querySelector('.scroll-id-link');
|
||||
if (idLink) {
|
||||
idLink.href = `/${data.item_id}`;
|
||||
idLink.textContent = `#${data.item_id}`;
|
||||
idLink.href = `/${data.item_path || data.item_id}`;
|
||||
idLink.textContent = `/${data.item_path || data.item_id}`;
|
||||
}
|
||||
// Reflect rehoster's username and local timestamp
|
||||
if (window.scrollerUsername) {
|
||||
|
||||
Reference in New Issue
Block a user