吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 536|回复: 3
收起左侧

[其他转载] 网页版App Store跳转到iTunes-油猴脚本

[复制链接]
 发表于 2025-12-31 23:42
本帖最后由  于 2026-1-1 02:32 编辑

现在连iTunes 12.6.5.3都无法搜索应用了,不过好在能新购和下载APP。
除此之外,有些iPhone系统版本过低无法直接在手机App Store新购应用可以到iTunes上购买,购买完后手机上可能还是显示“购买”等字样,这是手机还没反应过来直接点击就会提示下载旧版本了。

脚本用法也很简单,浏览器打开App Store找到你要下载的应用然后点击侧栏的苹果图标跳转到iTunes。

脚本是纯AI写的,跳不过去的多试几遍。实在跳不过去就去问AI。
// ==UserScript==
// @name         Apple Store跳转iTunes
// @version      1.0
// @match        *://apps.apple.com/*
// @grant        GM_setValue
// @grant        GM_getValue
// @run-at       document-end
// ==/UserScript==
(function() {
    'use strict';
    const getAppId = () => window.location.pathname.match(/\/id(\d+)/)?.[1];
    const runJump = () => {
        const appId = getAppId();
        if (appId) {
            window.location.href = `itms-apps://itunes.apple.com/app/id$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$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$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$${appId}?mt=8&ls=1`; }, 1000);
        }
    };
    const initUI = () => {
        if (document.getElementById('itunes-drawer-btn') || !window.location.pathname.includes('/app/')) return;
        let side = GM_getValue('apple_side', 'right');
        let topPos = GM_getValue('apple_top', window.innerHeight * 0.4);
        const box = document.createElement('div');
        box.id = 'itunes-drawer-btn';
        box.innerHTML = `<div class="drawer-wrapper"><div class="drawer-h"></div><div class="drawer-btn">iTunes 打开</div></div>`;
        const style = document.createElement('style');
        style.textContent = `
            #itunes-drawer-btn {
                position: fixed; top: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$${topPos}px; height: 40px;
                display: flex; align-items: center; z-index: 2147483647;
                transition: opacity 0.3s; opacity: 0.6;
                pointer-events: none; /* 防止隐形区域干扰 */
            }
            #itunes-drawer-btn:hover { opacity: 1; }
            .drawer-wrapper {
                display: flex; align-items: center; height: 100%;
                background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(15px);
                border: 0.5px solid rgba(255, 255, 255, 0.15);
                box-shadow: 0 4px 15px rgba(0,0,0,0.2);
                transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
                pointer-events: auto; /* 仅让按钮区域响应鼠标 */
            }
            /* 右侧吸附修复:强制 0 间距 */
            #itunes-drawer-btn.right { right: 0; margin-right: 0; }
            #itunes-drawer-btn.right .drawer-wrapper {
                border-radius: 20px 0 0 20px; border-right: none;
                transform: translateX(calc(100% - 44px));
            }
            #itunes-drawer-btn.right:hover .drawer-wrapper { transform: translateX(0); }
            /* 左侧吸附修复:强制 0 间距 */
            #itunes-drawer-btn.left { left: 0; flex-direction: row-reverse; margin-left: 0; }
            #itunes-drawer-btn.left .drawer-wrapper {
                flex-direction: row-reverse; border-radius: 0 20px 20px 0; border-left: none;
                transform: translateX(calc(-100% + 44px));
            }
            #itunes-drawer-btn.left:hover .drawer-wrapper { transform: translateX(0); }
            .drawer-h {
                width: 44px; height: 40px; color: #fff;
                display: flex; align-items: center; justify-content: center;
                font-size: 20px; flex-shrink: 0; cursor: pointer;
                transition: transform 0.2s ease; user-select: none;
            }
            .drawer-h:hover { transform: scale(1.15); }
            .drawer-btn {
                padding: 0 15px 0 5px; color: rgba(255,255,255,0.9);
                font-size: 12px; font-weight: 600; white-space: nowrap;
                height: 100%; display: flex; align-items: center; cursor: pointer;
            }
            #itunes-drawer-btn.left .drawer-btn { padding: 0 5px 0 15px; }
        `;
        document.head.appendChild(style);
        document.body.appendChild(box);
        box.className = side;
        let moved = false;
        const h = box.querySelector('.drawer-h');
        const btn = box.querySelector('.drawer-btn');
        h.onclick = (e) => { if (!moved) runJump(); };
        btn.onclick = () => runJump();
        h.onmousedown = (e) => {
            moved = false;
            box.style.transition = 'none';
            let startY = e.clientY, startTop = box.offsetTop;
            const onMove = (ev) => {
                if (Math.abs(ev.clientY - startY) > 5) {
                    moved = true;
                    box.style.top = (startTop + ev.clientY - startY) + 'px';
                }
            };
            const onUp = (ev) => {
                box.style.transition = '';
                let s = (ev.clientX < window.innerWidth / 2) ? 'left' : 'right';
                box.className = s;
                GM_setValue('apple_side', s); GM_setValue('apple_top', box.offsetTop);
                document.removeEventListener('mousemove', onMove);
                document.removeEventListener('mouseup', onUp);
            };
            document.addEventListener('mousemove', onMove);
            document.addEventListener('mouseup', onUp);
        };
    };
    let lastUrl = location.href;
    new MutationObserver(() => {
        if (location.href !== lastUrl) {
            lastUrl = location.href;
            setTimeout(initUI, 500);
        }
    }).observe(document, {subtree: true, childList: true});
    initUI();
})();

免费评分

参与人数 1吾爱币 +1 热心值 +1 收起 理由
jianny + 1 + 1 一直在找这样的链接跳转,完美实现我的愿望

查看全部评分

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

aa868682008 发表于 2026-1-1 19:44
用用先。对于造福大众的东西,大赞。
luodeman 发表于 2026-1-1 22:41
yjjjrtfk1984229 发表于 2026-1-1 23:45
谢谢博主分享,不知道低系统老版本的微信是否还有办法使用
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - 52pojie.cn ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2026-1-2 18:12

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表