nbphj 发布于周二 09:48 作者 发布于周二 09:48 · 只看该作者 50 分钟前,攸薩说道: 回到你使用附件那个回覆或主题,重新编辑,可以看到取消附件 重新编辑只能看到”您已经使用了所允许的附件空间。 Manage Attachments to free up space“点进去又跳回附件列表了,能具体告知一下在什么位置吗
攸薩 发布于周二 12:31 发布于周二 12:31 · 只看该作者 2 小时前,nbphj说道: 重新编辑只能看到”您已经使用了所允许的附件空间。 Manage Attachments to free up space“点进去又跳回附件列表了,能具体告知一下在什么位置吗 你对你当初上传附件的回复按编辑,在底下有已上传的图片这一行,你是说你是编辑按下去后,就不让你去点 拖动文件到此添加附件或 选择文件... 接受的格式: zip, 7z, rar, txt, jpg, png, gif, tar.gz, webp, webm 最大总大小: 24.08 kB 已上传的图片 =>这下面的图片按X 如果你说点X还强行让你跳开,不准你删除这个"当初上传附件"的回复,这样就会在帮你找人查看~请回复告知有没有找到()
nbphj 发布于周三 01:23 作者 发布于周三 01:23 · 只看该作者 12 小时前,攸薩说道: 你对你当初上传附件的回复按编辑,在底下有已上传的图片这一行,你是说你是编辑按下去后,就不让你去点 拖动文件到此添加附件或 选择文件... 接受的格式: zip, 7z, rar, txt, jpg, png, gif, tar.gz, webp, webm 最大总大小: 24.08 kB 已上传的图片 =>这下面的图片按X 如果你说点X还强行让你跳开,不准你删除这个"当初上传附件"的回复,这样就会在帮你找人查看~请回复告知有没有找到() 没有看到有这个选项 nbphj在游玩时被热情的工作人员拉进主题公园,在参与游戏之后获得奖励4节操。
箜茗潇 发布于周三 04:43 发布于周三 04:43 (已修改) · 只看该作者 在上传附件的楼层修改,点击附件,右上角会有个叉。手机版就不清楚了 如果原帖被锁就删不了了 不建议用附件,试试外链图床吧 周三 04:47,由箜茗潇修改 箜茗潇不吃不喝三天三夜只为“汉化”某悬赏游戏,搞定后发现居然是要翻译成俄语.-1节操
攸薩 发布于周三 12:25 发布于周三 12:25 (已修改) · 只看该作者 11 小时前,nbphj说道: 没有看到有这个选项 你先点来这里https://sstm.moe/attachments/,这个画面中已经把你所有 "当初上传那些附件的原回复或主题"都列出来了,必须要从这里进去该回复或主题。 只要有点对是"当初上传那些附件的原回复或主题",再按编辑就会出现下面的画面 实测手机版也是可以点进去https://sstm.moe/attachments/,然后点附件对应的右侧链接,进去编辑也能找到附件当初上传的地址并删图的噢~ 如果你确定是从https://sstm.moe/attachments/,点进去也是你上图所说的回复,肯定是你上传附件的链接,但你就是在手机端看不到,也无法上PC端,你也可以请当区版主愿不愿意帮你编辑帮你删除附件。 若当区版主直接点进你这条回复也找不到的话,最大的可能性是这回复很有可能不是上传附件的回复,方才实测其他人上传附件的回复,当区版主也是可以进行删除的情况。 周三 12:34,由攸薩修改
nbphj 发布于昨日 06:11 作者 发布于昨日 06:11 (已修改) · 只看该作者 17 小时前,攸薩说道: 你先点来这里https://sstm.moe/attachments/,这个画面中已经把你所有 "当初上传那些附件的原回复或主题"都列出来了,必须要从这里进去该回复或主题。 只要有点对是"当初上传那些附件的原回复或主题",再按编辑就会出现下面的画面 实测手机版也是可以点进去https://sstm.moe/attachments/,然后点附件对应的右侧链接,进去编辑也能找到附件当初上传的地址并删图的噢~ 如果你确定是从https://sstm.moe/attachments/,点进去也是你上图所说的回复,肯定是你上传附件的链接,但你就是在手机端看不到,也无法上PC端,你也可以请当区版主愿不愿意帮你编辑帮你删除附件。 若当区版主直接点进你这条回复也找不到的话,最大的可能性是这回复很有可能不是上传附件的回复,方才实测其他人上传附件的回复,当区版主也是可以进行删除的情况。 我在pc上按照你的方式操作也是一样的情况,只有”您已经使用了所允许的附件空间。 Manage Attachments to free up space“没有任何其他选项,可能这是只有在配额用完之后才会出现的bug。 昨日 06:15,由nbphj修改
攸薩 发布于23 小时前 发布于23 小时前 · 只看该作者 3 小时前,nbphj说道: 我在pc上按照你的方式操作也是一样的情况,只有”您已经使用了所允许的附件空间。 Manage Attachments to free up space“没有任何其他选项,可能这是只有在配额用完之后才会出现的bug。 @萨卡 会员反应附件额度满了之后,前往当初上传附件的回覆也不让删除 攸薩在华山论剑时惨中面目全非脚.-1节操
367ddd 发布于33 分钟前 发布于33 分钟前 · 只看该作者 电脑端,使用tampermonkey插件,试试看把这个脚本拷贝进去,如果是你有修改权限的帖子会删除附件,如果你没修改权限的话会报404,至少我实验是有效的 // ==UserScript== // @name SSTM 附件页删除按钮(区分主题/回复) // @namespace https://example.com/ // @version 0.2.0 // @author sstm脚本组 // @description 在 https://sstm.moe/attachments/ 页面为每个附件块插入删除按钮,并根据来源链接自动判断编辑主题还是编辑回复 // @match https://sstm.moe/attachments/* // @match https://sstm.moe/attachments/ // @grant none // ==/UserScript== (function () { 'use strict'; const CONFIG = { itemSelector: 'div.ipsDataItem.ipsAttach', attachmentLinkSelector: 'a[href*="/applications/core/interface/file/attachment.php?id="]', sourceLinkSelector: '.ipsDataItem_generic.ipsDataItem_size9 a[href*="/topic/"]', buttonClass: 'sstm-delete-attachment-btn', confirmBeforeDelete: true, debug: true }; function log(...args) { if (CONFIG.debug) { console.log('[SSTM Attachment Delete]', ...args); } } function absoluteUrl(url) { return new URL(url, location.origin).toString(); } function getCsrfKey() { const fromMeta = document.querySelector('meta[name="csrfKey"]')?.content; if (fromMeta) return fromMeta; const fromWindow1 = window.ips?.getSetting?.('csrfKey'); if (fromWindow1) return fromWindow1; const fromWindow2 = window.ipsSettings?.csrfKey; if (fromWindow2) return fromWindow2; const m = document.cookie.match(/(?:^|;\s*)csrfKey=([^;]+)/); if (m) return decodeURIComponent(m[1]); return null; } function extractAttachmentId(item) { const link = item.querySelector(CONFIG.attachmentLinkSelector); if (!link) return null; try { const url = new URL(link.href, location.origin); return url.searchParams.get('id'); } catch (e) { return null; } } function extractFileName(item) { const el = item.querySelector('.ipsAttach_title a, .ipsDataItem_title a'); return el ? el.textContent.trim() : '未知附件'; } function extractSourceInfo(item) { const sourceLink = item.querySelector(CONFIG.sourceLinkSelector); if (!sourceLink) return null; const href = absoluteUrl(sourceLink.href); const url = new URL(href); const commentId = url.searchParams.get('comment'); const doValue = url.searchParams.get('do'); const isReply = doValue === 'findComment' && !!commentId; if (isReply) { url.searchParams.delete('do'); url.searchParams.delete('comment'); return { type: 'reply', sourceUrl: href, baseTopicUrl: url.toString(), commentId }; } url.searchParams.delete('do'); url.searchParams.delete('comment'); return { type: 'topic', sourceUrl: href, baseTopicUrl: url.toString(), commentId: null }; } function buildEditUrl(sourceInfo, csrfKey) { const url = new URL(sourceInfo.baseTopicUrl, location.origin); if (sourceInfo.type === 'reply') { url.searchParams.set('do', 'editComment'); url.searchParams.set('comment', sourceInfo.commentId); } else { url.searchParams.set('do', 'edit'); } if (csrfKey) { url.searchParams.set('csrfKey', csrfKey); } return url.toString(); } async function fetchText(url, options = {}) { const resp = await fetch(url, { credentials: 'include', cache: 'no-cache', ...options }); if (!resp.ok) { throw new Error(`请求失败 ${resp.status} ${resp.statusText}`); } return await resp.text(); } function parseHTML(html) { return new DOMParser().parseFromString(html, 'text/html'); } function extractPostKeyFromEditHtml(html) { const doc = new DOMParser().parseFromString(html, 'text/html'); // 1. 优先从 IPS 编辑器容器读取 const editorEl = doc.querySelector('[data-ipseditor-postkey]'); if (editorEl) { const postKey = editorEl.getAttribute('data-ipseditor-postkey'); if (postKey) return postKey; } // 2. 兜底:兼容可能存在的 input const input = doc.querySelector('input[name="postKey"]'); if (input?.value) return input.value; // 3. 再兜底:正则扫原始 HTML let m = html.match(/data-ipseditor-postkey=["']([^"']+)["']/i); if (m) return m[1]; m = html.match(/name=["']postKey["'][^>]*value=["']([^"']+)["']/i); if (m) return m[1]; m = html.match(/["']postKey["']\s*:\s*["']([^"']+)["']/i); if (m) return m[1]; return null; } async function deleteAttachment(editUrl, attachmentId, postKey, csrfKey) { const url = new URL(editUrl, location.origin); url.searchParams.set('postKey', postKey); url.searchParams.set('deleteFile', attachmentId); if (csrfKey) { url.searchParams.set('csrfKey', csrfKey); } log('删除请求 URL:', url.toString()); const resp = await fetch(url.toString(), { method: 'GET', credentials: 'include', mode: 'cors', headers: { 'accept': '*/*', 'cache-control': 'no-cache', 'pragma': 'no-cache', 'x-requested-with': 'XMLHttpRequest' }, referrer: editUrl }); if (!resp.ok) { throw new Error(`删除请求失败 ${resp.status} ${resp.statusText}`); } return await resp.text(); } function setBtnState(btn, state, text) { btn.disabled = state === 'loading'; btn.textContent = text; if (state === 'loading') { btn.style.opacity = '0.7'; btn.style.cursor = 'wait'; } else { btn.style.opacity = '1'; btn.style.cursor = 'pointer'; } } function removeItem(item) { item.style.transition = 'opacity .25s ease, transform .25s ease'; item.style.opacity = '0'; item.style.transform = 'scale(0.98)'; setTimeout(() => item.remove(), 260); } async function handleDelete(item, btn) { const attachmentId = extractAttachmentId(item); const fileName = extractFileName(item); const sourceInfo = extractSourceInfo(item); const csrfKey = getCsrfKey(); if (!attachmentId) { alert('未找到附件 ID'); return; } if (!sourceInfo) { alert('未找到该附件对应的主题/回复链接'); return; } if (!csrfKey) { alert('未找到 csrfKey'); return; } const targetText = sourceInfo.type === 'reply' ? `回复 #${sourceInfo.commentId}` : '主题首楼'; if (CONFIG.confirmBeforeDelete) { const ok = confirm( `确定删除附件吗?\n\n文件名:${fileName}\n附件ID:${attachmentId}\n挂载位置:${targetText}` ); if (!ok) return; } try { setBtnState(btn, 'loading', '读取编辑页...'); const editUrl = buildEditUrl(sourceInfo, csrfKey); log('编辑页 URL:', editUrl); log('来源类型:', sourceInfo.type, sourceInfo); const editHtml = await fetchText(editUrl, { headers: { 'accept': 'text/html,application/xhtml+xml' } }); const postKey = extractPostKeyFromEditHtml(editHtml); if (!postKey) { throw new Error('未能从编辑页中解析出 postKey'); } setBtnState(btn, 'loading', '提交删除...'); const result = await deleteAttachment(editUrl, attachmentId, postKey, csrfKey); log('删除响应:', result); setBtnState(btn, 'success', '已删除'); removeItem(item); } catch (err) { console.error(err); setBtnState(btn, 'error', '删除失败'); alert(`删除失败:${err.message}`); setTimeout(() => { setBtnState(btn, 'idle', '删除附件'); }, 1200); } } function injectButton(item) { if (item.querySelector(`.${CONFIG.buttonClass}`)) return; const attachmentId = extractAttachmentId(item); const sourceInfo = extractSourceInfo(item); if (!attachmentId || !sourceInfo) return; const btn = document.createElement('button'); btn.type = 'button'; btn.className = CONFIG.buttonClass; btn.textContent = '删除附件'; btn.style.marginTop = '8px'; btn.style.padding = '6px 10px'; btn.style.border = '1px solid #cc3333'; btn.style.borderRadius = '4px'; btn.style.background = '#fff5f5'; btn.style.color = '#b30000'; btn.style.fontSize = '12px'; btn.style.lineHeight = '1.2'; btn.style.cursor = 'pointer'; btn.addEventListener('mouseenter', () => { if (!btn.disabled) btn.style.background = '#ffeaea'; }); btn.addEventListener('mouseleave', () => { if (!btn.disabled) btn.style.background = '#fff5f5'; }); btn.addEventListener('click', (e) => { e.preventDefault(); e.stopPropagation(); handleDelete(item, btn); }); const target = item.querySelector('.ipsDataItem_main') || item; target.appendChild(btn); } function processAll() { document.querySelectorAll(CONFIG.itemSelector).forEach(injectButton); } function observe() { const observer = new MutationObserver((mutations) => { for (const mutation of mutations) { for (const node of mutation.addedNodes) { if (!(node instanceof Element)) continue; if (node.matches?.(CONFIG.itemSelector)) { injectButton(node); } node.querySelectorAll?.(CONFIG.itemSelector).forEach(injectButton); } } }); observer.observe(document.body, { childList: true, subtree: true }); } processAll(); observe(); })(); 然后之后如果想上传图片/视频的话,可以试试看这个https://sstm.moe/topic/378868-【油猴脚本】便捷文件上传自定义表情包/?do=findComment&comment=18887760 367ddd在文学领地阅读作品时遇到了穿着女仆装的文学少女,待她离开后找到了遗落的10节操 1
推荐贴
创建帐号或登入才能点评
您必须成为用户才能点评
创建帐号
在我们社区注册个新的帐号。非常简单!
注册新帐号登入
已有帐号? 登入
现在登入