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.2
// @author wOxxOm
// @namespace wOxxOm.scripts
// @license MIT License
// @run-at document-start
// @grant GM_addStyle
// ==/UserScript==
GM_addStyle('\
.expand-pages-container,\
.details-section.screenshots .thumbnails-wrapper,\
.details-section.screenshots .thumbnails {\
overflow-x: visible !important;\
white-space: normal !important;\
height: auto !important;\
}\
.expandable .expand-button,\
.expand-pages-container .expand-page {\
display: none !important;\
}\
.expand-pages-container .expand-page:first-child {\
display: block !important;\
}\
.details-section.screenshots .thumbnails,\
.details-section.screenshots .thumbnails-wrapper {\
margin-bottom: 0 !important;\
}');
var ob = new MutationObserver(function(mutations){
for (var i=0, ml=mutations.length, m; (i<ml) && (m=mutations[i]); i++)
if (!m.previousSibling && (m.target.className == 'details-section-body expandable'))
for (var j=0, nodes=m.addedNodes, nl=nodes.length, n; (j<nl) && (n=nodes[j]); j++)
if (n.nodeType == 1) {
var title = document.querySelector('.document-title').textContent.trim();
var imgs = n.querySelectorAll('img.screenshot.clickable');
for (var k=0, img; (k<imgs.length) && (img=imgs[k]); k++)
img.outerHTML = '<a href="' + img.src.replace(/^(.+?)=h\d+.*/,'$1=h900') +
'" title="' + title + ' (' + (k+1) + ')">' + img.outerHTML + '</a>';
ob.disconnect();
return;
}
});
ob.observe(document, {subtree:true, childList:true});