您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Shows all the screenshots without the scrollbox and adds direct links for fullsized versions
当前为
// ==UserScript== // @name GooglePlay direct screenshot links // @description Shows all the screenshots without the scrollbox and adds direct links for fullsized versions // @include https://play.google.com/store* // @version 1.0.9 // @author wOxxOm // @namespace wOxxOm.scripts // @license MIT License // @run-at document-start // ==/UserScript== const GALLERY_ATTR = 'data-slideable-portion-heuristic-width'; const GALLERY_SELECTOR = `[${GALLERY_ATTR}]`; onMutation([{ addedNodes: [document.body], target: document.documentElement, }]); new MutationObserver(onMutation) .observe(document, {subtree:true, childList:true}); function onMutation(mutations) { for (const m of mutations) { let node = m.target; if (!node.hasAttribute(GALLERY_ATTR)) { for (let i = 0; node; (node = m.addedNodes[i++])) { if (node.localName === 'c-wiz' || node.getElementsByTagName('c-wiz')[0]) { node = node.querySelector(GALLERY_SELECTOR); if (node) break; } } } if (node) { requestAnimationFrame(() => { node.outerHTML = '<div>' + [...node.getElementsByTagName('img')].map(makeImageHtml) + '</div>'; }); break; } } } function makeImageHtml(img) { const src = img.dataset.src || (img.srcset || '').split(' ', 1)[0] || img.src || ''; return img.nextElementSibling ? img.parentNode.outerHTML : `<a href="${src.replace(/=.*/, '=h900')}"><img src="${src.replace(/=.*/, '=h420')}"></a>`; }