add: 首次提交油猴脚本
This commit is contained in:
@@ -0,0 +1,349 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>固定网站显示替换 - 脚本下载</title>
|
||||
<style>
|
||||
body { font-family: -apple-system, sans-serif; padding: 20px; max-width: 640px; margin: 0 auto; }
|
||||
.acc-list { max-height: 70vh; overflow-y: auto; border: 1px solid #e0c9a6; border-radius: 10px; background: #fdf6ec; padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
|
||||
.acc-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border: 1px solid #e0c9a6; border-radius: 16px; background: #fff; font-size: 12px; line-height: 1.4; max-width: 100%; }
|
||||
.acc-chip.done { opacity: 0.45; background: #f0ead9; }
|
||||
.acc-chip.done .acc-mail, .acc-chip.done .acc-pass { text-decoration: line-through; }
|
||||
.acc-chip input[type="checkbox"] { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; }
|
||||
.acc-mail { font-weight: 600; word-break: break-all; }
|
||||
.acc-pass { color: #6b4f2a; }
|
||||
.time-tag { font-size: 11px; color: #8a5a00; background: #fdf0d8; border-radius: 10px; padding: 1px 6px; }
|
||||
.progress-bar { padding: 10px 14px; border-radius: 10px; background: #eef4ff; color: #0a66c2; font-size: 15px; font-weight: 600; margin-bottom: 8px; border: 1px solid #c9ddf5; }
|
||||
.acc-mail { cursor: pointer; }
|
||||
.acc-mail:active, .acc-pass:active { opacity: 0.6; }
|
||||
.acc-pass { cursor: pointer; }
|
||||
.locked-box { padding: 14px; border: 1px solid #e0c9a6; border-radius: 10px; background: #fdf6ec; margin-bottom: 8px; }
|
||||
.store-block { margin-bottom: 24px; }
|
||||
|
||||
/* ===== 火影忍者彩蛋按钮(官网风格:黑底+橙色火焰+倒计时块) ===== */
|
||||
.naruto-zone { display: flex; gap: 12px; margin: 20px 0; }
|
||||
.naruto-btn {
|
||||
flex: 1; position: relative; padding: 14px 10px 12px; border: 1px solid rgba(255, 140, 0, 0.7); border-radius: 6px;
|
||||
background: #0a0a0a; color: #ffb347; cursor: pointer;
|
||||
font-size: 14px; font-weight: 700; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
|
||||
letter-spacing: 1px; text-align: center;
|
||||
box-shadow: 0 0 0 1px rgba(255, 140, 0, 0.15), 0 4px 20px rgba(255, 100, 0, 0.12);
|
||||
transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
|
||||
}
|
||||
.naruto-btn:hover { border-color: #ff8c00; box-shadow: 0 0 0 1px rgba(255, 140, 0, 0.35), 0 4px 24px rgba(255, 100, 0, 0.28); }
|
||||
.naruto-btn:active { transform: scale(0.96); }
|
||||
/* 四角橙点装饰(官网风格的角标) */
|
||||
.naruto-btn .corner { position: absolute; width: 7px; height: 7px; background: #ff8c00; box-shadow: 0 0 6px rgba(255, 140, 0, 0.9); }
|
||||
.naruto-btn .corner.tl { top: 5px; left: 5px; }
|
||||
.naruto-btn .corner.tr { top: 5px; right: 5px; }
|
||||
.naruto-btn .corner.bl { bottom: 5px; left: 5px; }
|
||||
.naruto-btn .corner.br { bottom: 5px; right: 5px; }
|
||||
/* 顶部小标签(官网的 SECONDS/DAYS 小字样式) */
|
||||
.naruto-btn .btn-eng { display: block; font-size: 9px; letter-spacing: 3px; color: rgba(255, 140, 0, 0.65); font-weight: 600; margin-bottom: 5px; }
|
||||
.naruto-btn .btn-label { display: block; font-size: 15px; font-weight: 800; text-shadow: 0 0 10px rgba(255, 140, 0, 0.7); }
|
||||
.naruto-btn .btn-sub { display: block; font-size: 10px; font-weight: 400; color: #8a6a3a; margin-top: 5px; letter-spacing: 2px; }
|
||||
/* 底部橙色火焰细线(官网的强调线) */
|
||||
.naruto-btn .btn-fire { position: absolute; left: 12%; right: 12%; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, #ff8c00 30%, #ffd700 50%, #ff8c00 70%, transparent); box-shadow: 0 0 8px rgba(255, 140, 0, 0.8); }
|
||||
|
||||
/* ===== 5秒穿越全屏loading(官网倒计时风格) ===== */
|
||||
#time-jump-overlay {
|
||||
position: fixed; inset: 0; z-index: 99999; display: none; flex-direction: column; align-items: center; justify-content: center;
|
||||
background: radial-gradient(ellipse at center, #140a02 0%, #000 80%);
|
||||
}
|
||||
#time-jump-overlay.on { display: flex; }
|
||||
/* 官网式倒计时大数字块 */
|
||||
#tj-count-block {
|
||||
position: relative; width: 180px; height: 120px; display: flex; align-items: center; justify-content: center;
|
||||
border: 1px solid rgba(255, 140, 0, 0.5); background: rgba(0, 0, 0, 0.6); border-radius: 4px;
|
||||
box-shadow: 0 0 0 1px rgba(255, 140, 0, 0.12), 0 0 40px rgba(255, 100, 0, 0.15), inset 0 0 30px rgba(255, 100, 0, 0.08);
|
||||
}
|
||||
#tj-count-block .tj-corner { position: absolute; width: 10px; height: 10px; border: 1px solid #ff8c00; }
|
||||
#tj-count-block .tj-corner.tl { top: 6px; left: 6px; border-right: none; border-bottom: none; }
|
||||
#tj-count-block .tj-corner.tr { top: 6px; right: 6px; border-left: none; border-bottom: none; }
|
||||
#tj-count-block .tj-corner.bl { bottom: 6px; left: 6px; border-right: none; border-top: none; }
|
||||
#tj-count-block .tj-corner.br { bottom: 6px; right: 6px; border-left: none; border-top: none; }
|
||||
#tj-count { font-size: 72px; font-weight: 900; color: #ff8c00; text-shadow: 0 0 24px rgba(255, 140, 0, 0.9), 0 0 60px rgba(255, 80, 0, 0.5); font-variant-numeric: tabular-nums; line-height: 1; }
|
||||
#tj-unit { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 10px; letter-spacing: 4px; color: rgba(255, 140, 0, 0.6); font-weight: 600; }
|
||||
/* 官网 SECONDS 小标签 */
|
||||
#tj-eng { font-size: 10px; letter-spacing: 6px; color: rgba(255, 140, 0, 0.55); font-weight: 700; margin-bottom: 10px; }
|
||||
#tj-shuriken {
|
||||
font-size: 30px; color: #ff8c00; margin-bottom: 14px; text-shadow: 0 0 20px rgba(255, 140, 0, 0.9);
|
||||
animation: shuriken-spin 1.4s linear infinite; opacity: 0.9;
|
||||
}
|
||||
#tj-text { color: #8a6a3a; font-size: 12px; margin-top: 16px; letter-spacing: 4px; }
|
||||
#tj-bar { width: 180px; height: 3px; background: rgba(255, 140, 0, 0.15); margin-top: 14px; overflow: hidden; }
|
||||
#tj-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #ff8c00, #ffd700); box-shadow: 0 0 8px rgba(255, 200, 60, 0.9); transition: width 5s linear; }
|
||||
@keyframes shuriken-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
|
||||
|
||||
/* 小屏(iPhone SE 等窄屏) */
|
||||
@media (max-width: 380px) {
|
||||
.acc-chip { max-width: 100%; }
|
||||
.acc-chip .btn-acc { padding: 4px 8px; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>📦 下载脚本(最新版)</h2>
|
||||
<ul style="font-size:18px;line-height:2">
|
||||
<li><a href="javascript:void(0)" onclick="forceDownload('code-v1.6.1.user.js')" style="color:#0a66c2">code-v1.6.1.user.js</a> ⭐ 最新版 (v1.6.1)</li>
|
||||
<li><a href="javascript:void(0)" onclick="forceDownload('code-v1.6.2jr.user.js')" style="color:#0a66c2">code-v1.6.2jr.user.js</a> 兼容版 (v1.6.2)</li>
|
||||
<li><a href="javascript:void(0)" onclick="forceDownload('code-v0.6.1.user.js')" style="color:#0a66c2">code-v0.6.1.user.js</a> (v0.6.1)</li>
|
||||
</ul>
|
||||
<p style="color:#888">在 iPhone 上点 code-v0.7.0.user.js(最新版)即开始下载,然后用 Userscripts 应用导入。<br>需要旧版本时点对应版本文件。</p>
|
||||
<h3>🧪 注入测试(排查用)</h3>
|
||||
<ul style="font-size:18px;line-height:2">
|
||||
<li><a href="javascript:void(0)" onclick="forceDownload('test-inject.user.js')" style="color:#0a66c2">test-inject.user.js</a> (任意网站左上角显示蓝色标记,验证 Userscripts 是否正常注入)</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h3>📌 bookmarklet 书签版(不依赖扩展)</h3>
|
||||
<p style="font-size:15px;line-height:1.7">不想装扩展?点下方按钮把新脚本复制到剪贴板,然后粘贴到书签 URL 即可:<br>打开任意网页 → 分享 → <b>添加书签</b> → 书本按钮 → <b>编辑</b> → 把地址全部删掉 → <b>长按粘贴</b> → 完成。<br>之后在目标网站点这个书签,文字立即替换。</p>
|
||||
<button onclick="copyBookmarklet()" style="width:100%;padding:14px;font-size:17px;border:none;border-radius:10px;background:#0a66c2;color:#fff;margin:4px 0 14px">📋 复制新脚本到剪贴板</button>
|
||||
<p style="color:#888">💡 复制成功后,把内容粘贴到任意书签的「地址」栏(以 <code>javascript:</code> 开头)。<br>规则配置与油猴版共用,首次点击弹出设置面板时填写即可。</p>
|
||||
<hr>
|
||||
<h3>🔗 目标网站</h3>
|
||||
<p style="font-size:18px;line-height:1.8">
|
||||
<a href="https://parks2.bandainamco-am.co.jp/" target="_blank" rel="noopener" style="color:#0a66c2;word-break:break-all">https://parks2.bandainamco-am.co.jp/</a>
|
||||
</p>
|
||||
<p style="color:#888">👆 点击在新页签打开网站;长按链接可弹出菜单「拷贝」,复制网址。</p>
|
||||
<hr>
|
||||
|
||||
<script src="shibuya-accounts.js"></script>
|
||||
<script src="nagoya-accounts.js"></script>
|
||||
<script src="koshigaya-accounts.js"></script>
|
||||
<script>
|
||||
var PASSCODE = {
|
||||
shibuya: "8899",
|
||||
nagoya: "1358",
|
||||
koshigaya: "888888"
|
||||
};
|
||||
|
||||
var STORES = {
|
||||
shibuya: { key: "acc-key-shibuya", msg: "acc-msg-shibuya", locked: "acc-locked-shibuya", area: "acc-area-shibuya", list: "acc-list-shibuya", data: SHIBUYA_ACCOUNTS, doneKey: "done-shibuya" },
|
||||
nagoya: { key: "acc-key-nagoya", msg: "acc-msg-nagoya", locked: "acc-locked-nagoya", area: "acc-area-nagoya", list: "acc-list-nagoya", data: NAGOYA_ACCOUNTS, doneKey: "done-nagoya" },
|
||||
koshigaya: { key: "acc-key-koshigaya", msg: "acc-msg-koshigaya", locked: "acc-locked-koshigaya", area: "acc-area-koshigaya", list: "acc-list-koshigaya", data: KOSHIGAYA_ACCOUNTS, doneKey: "done-koshigaya" }
|
||||
};
|
||||
|
||||
// 每个店铺的完成状态(localStorage)
|
||||
function loadDone(storeName) {
|
||||
try { return JSON.parse(localStorage.getItem(STORES[storeName].doneKey)) || {}; }
|
||||
catch (e) { return {}; }
|
||||
}
|
||||
function saveDone(storeName, done) {
|
||||
try { localStorage.setItem(STORES[storeName].doneKey, JSON.stringify(done)); } catch (e) { }
|
||||
}
|
||||
function toggleDone(storeName, email, cb) {
|
||||
var done = loadDone(storeName);
|
||||
if (cb.checked) done[email] = true;
|
||||
else delete done[email];
|
||||
saveDone(storeName, done);
|
||||
var chip = cb.closest('.acc-chip');
|
||||
if (chip) chip.classList.toggle('done', cb.checked);
|
||||
updateProgress(storeName);
|
||||
}
|
||||
|
||||
function forceDownload(filename) {
|
||||
var btn = event && event.target ? event.target : null;
|
||||
if (btn) {
|
||||
var old = btn.textContent;
|
||||
btn.textContent = '下载中…';
|
||||
setTimeout(function () { btn.textContent = old; }, 3000);
|
||||
}
|
||||
fetch(filename)
|
||||
.then(function (r) { return r.blob(); })
|
||||
.then(function (blob) {
|
||||
var a = document.createElement('a');
|
||||
var url = URL.createObjectURL(blob);
|
||||
a.href = url;
|
||||
a.download = filename;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
setTimeout(function () { URL.revokeObjectURL(url); }, 10000);
|
||||
})
|
||||
.catch(function () {
|
||||
window.location.href = filename;
|
||||
});
|
||||
}
|
||||
|
||||
function legacyCopy(text, done) {
|
||||
var ta = document.createElement('textarea');
|
||||
ta.value = text;
|
||||
ta.style.position = 'fixed';
|
||||
ta.style.opacity = '0';
|
||||
document.body.appendChild(ta);
|
||||
ta.focus();
|
||||
ta.select();
|
||||
ta.setSelectionRange(0, text.length);
|
||||
try { document.execCommand('copy'); } catch (e) { /* ignore */ }
|
||||
document.body.removeChild(ta);
|
||||
done();
|
||||
}
|
||||
|
||||
function copyText(text, done) {
|
||||
if (navigator.clipboard && navigator.clipboard.writeText) {
|
||||
navigator.clipboard.writeText(text).then(done, function () { legacyCopy(text, done); });
|
||||
} else {
|
||||
legacyCopy(text, done);
|
||||
}
|
||||
}
|
||||
|
||||
// ===== 火影彩蛋:穿越到5秒后 =====
|
||||
var tjTimer = null;
|
||||
function timeJump5s() {
|
||||
if (tjTimer) return;
|
||||
var overlay = document.getElementById('time-jump-overlay');
|
||||
var count = document.getElementById('tj-count');
|
||||
var fill = document.getElementById('tj-bar-fill');
|
||||
overlay.classList.add('on');
|
||||
count.textContent = '5';
|
||||
fill.style.transition = 'none';
|
||||
fill.style.width = '0%';
|
||||
void fill.offsetWidth;
|
||||
fill.style.transition = 'width 5s linear';
|
||||
fill.style.width = '100%';
|
||||
tjTimer = setInterval(function () {
|
||||
var left = Number(count.textContent) - 1;
|
||||
if (left > 0) {
|
||||
count.textContent = String(left);
|
||||
} else {
|
||||
clearInterval(tjTimer);
|
||||
tjTimer = null;
|
||||
overlay.classList.remove('on');
|
||||
showToast('✅ 已穿越到5秒后!');
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
// ===== 火影彩蛋:穿越到25号 =====
|
||||
function jumpTo25() {
|
||||
showToast('🕘 25号开启,敬请期待!');
|
||||
}
|
||||
|
||||
// 轻量 toast 提示
|
||||
function showToast(msg) {
|
||||
var t = document.getElementById('toast-tip');
|
||||
if (!t) {
|
||||
t = document.createElement('div');
|
||||
t.id = 'toast-tip';
|
||||
t.style.cssText = 'position:fixed;left:50%;bottom:120px;transform:translateX(-50%);background:rgba(0,0,0,0.8);color:#fff;padding:10px 18px;border-radius:20px;font-size:14px;z-index:9999;opacity:0;transition:opacity .25s;pointer-events:none;max-width:80%;text-align:center;word-break:break-all';
|
||||
document.body.appendChild(t);
|
||||
}
|
||||
t.textContent = msg;
|
||||
t.style.opacity = '1';
|
||||
clearTimeout(t._timer);
|
||||
t._timer = setTimeout(function () { t.style.opacity = '0'; }, 1800);
|
||||
}
|
||||
|
||||
// 点击账号/密码复制并 toast 提示
|
||||
function copyWithTip(text, label) {
|
||||
copyText(text, function () {
|
||||
showToast(label + ' 已复制:' + text);
|
||||
});
|
||||
}
|
||||
|
||||
// bookmarklet 复制:拉取 bookmarklet.txt 并复制到剪贴板
|
||||
function copyBookmarklet() {
|
||||
var btn = event && event.target ? event.target : null;
|
||||
if (btn) {
|
||||
var old = btn.textContent;
|
||||
btn.textContent = '⏳ 正在加载…';
|
||||
setTimeout(function () { btn.textContent = old; }, 3000);
|
||||
}
|
||||
fetch('bookmarklet.txt')
|
||||
.then(function (r) {
|
||||
if (!r.ok) throw new Error('HTTP ' + r.status);
|
||||
return r.text();
|
||||
})
|
||||
.then(function (text) {
|
||||
copyText(text, function () {
|
||||
showToast('✅ 新脚本已复制!去粘贴到书签地址栏吧');
|
||||
});
|
||||
})
|
||||
.catch(function (e) {
|
||||
showToast('❌ 加载失败:' + (e && e.message ? e.message : '未知错误'));
|
||||
});
|
||||
}
|
||||
|
||||
// 更新完成进度
|
||||
function updateProgress(storeName) {
|
||||
var cfg = STORES[storeName];
|
||||
var done = loadDone(storeName);
|
||||
var total = cfg.data.length;
|
||||
var count = 0;
|
||||
cfg.data.forEach(function (item) {
|
||||
if (done[String(item.email || "")]) count++;
|
||||
});
|
||||
var pct = total > 0 ? ((count / total) * 100).toFixed(2) : "0.00";
|
||||
var el = document.getElementById("progress-" + storeName);
|
||||
if (el) el.textContent = "完成 " + count + "/" + total + " (" + pct + "%)";
|
||||
}
|
||||
|
||||
function unlockStore(storeName) {
|
||||
var cfg = STORES[storeName];
|
||||
var key = document.getElementById(cfg.key).value.trim();
|
||||
var msg = document.getElementById(cfg.msg);
|
||||
if (key !== PASSCODE[storeName]) {
|
||||
msg.textContent = '❌ 口令错误';
|
||||
return;
|
||||
}
|
||||
msg.textContent = '';
|
||||
document.getElementById(cfg.locked).style.display = 'none';
|
||||
var area = document.getElementById(cfg.area);
|
||||
area.style.display = '';
|
||||
var list = document.getElementById(cfg.list);
|
||||
list.innerHTML = '';
|
||||
var done = loadDone(storeName);
|
||||
cfg.data.forEach(function (item, i) {
|
||||
var email = String(item.email || "");
|
||||
var isDone = !!done[email];
|
||||
var row = document.createElement('span');
|
||||
row.className = 'acc-chip' + (isDone ? ' done' : '');
|
||||
row.innerHTML =
|
||||
'<input type="checkbox"' + (isDone ? ' checked' : '') + ' onchange="toggleDone(\'' + storeName + '\', \'' + email.replace(/'/g, "\\'") + '\', this)">' +
|
||||
'<span class="acc-mail" id="acc-mail-' + storeName + '-' + i + '" onclick="copyWithTip(document.getElementById(\'acc-mail-' + storeName + '-' + i + '\').textContent, \'账号\')">' + email.replace(/</g, '<') + '</span>' +
|
||||
'<span class="acc-pass" id="acc-pass-' + storeName + '-' + i + '" onclick="copyWithTip(document.getElementById(\'acc-pass-' + storeName + '-' + i + '\').textContent, \'密码\')">' + String(item.pass || "").replace(/</g, '<') + '</span>' +
|
||||
(item.time ? '<span class="time-tag">' + item.time + '</span>' : '');
|
||||
list.appendChild(row);
|
||||
});
|
||||
updateProgress(storeName);
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- ===== 火影忍者彩蛋按钮(官网风格) ===== -->
|
||||
<div class="naruto-zone">
|
||||
<button class="naruto-btn" onclick="timeJump5s()">
|
||||
<span class="corner tl"></span><span class="corner tr"></span>
|
||||
<span class="corner bl"></span><span class="corner br"></span>
|
||||
<span class="btn-eng">TIME JUMP</span>
|
||||
<span class="btn-label">🌀 穿越到5秒后</span>
|
||||
<span class="btn-sub">忍法·時空間忍術</span>
|
||||
<span class="btn-fire"></span>
|
||||
</button>
|
||||
<button class="naruto-btn" onclick="jumpTo25()">
|
||||
<span class="corner tl"></span><span class="corner tr"></span>
|
||||
<span class="corner bl"></span><span class="corner br"></span>
|
||||
<span class="btn-eng">NEXT DAY</span>
|
||||
<span class="btn-label">🌀 穿越到25号</span>
|
||||
<span class="btn-sub">忍法·未来予知</span>
|
||||
<span class="btn-fire"></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 5秒穿越全屏loading(官网倒计时风格) -->
|
||||
<div id="time-jump-overlay">
|
||||
<div id="tj-eng">SECONDS</div>
|
||||
<div id="tj-shuriken">✴</div>
|
||||
<div id="tj-count-block">
|
||||
<span class="tj-corner tl"></span><span class="tj-corner tr"></span>
|
||||
<span class="tj-corner bl"></span><span class="tj-corner br"></span>
|
||||
<span id="tj-count">5</span>
|
||||
<span id="tj-unit">秒</span>
|
||||
</div>
|
||||
<div id="tj-bar"><div id="tj-bar-fill"></div></div>
|
||||
<div id="tj-text">時空忍術発動中…</div>
|
||||
</div>
|
||||
|
||||
<div style="height:300px"></div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user