Hide purchases you didn't pay for
"My Pricy Orders" in Google Play store
Google Play is providing a nice list of Orders, however I couldn’t care less about Free books app installations as My Orders. This little script loads the whole list and then removes all “Free” items, leaving you only the pricy ones: Google Play: Remove free Orders. 1
var sort = true;
function clean() {
$('.my-account-purchase-row')
.filter(function(i, x) {
var price = $(x).find(".my-account-purchase-price").text().trim();
return /Free|[^\d]+0([.,]?0*)$|^0[.,]?0*[^\d]+/.test(price);
})
.remove()
;
}
function compareByPrice(a, b) {
var aPrice = $(a).find('.my-account-purchase-price').text().replace(/[^0-9,.;]/g, "");
var bPrice = $(b).find('.my-account-purchase-price').text().replace(/[^0-9,.;]/g, "");
return bPrice - aPrice;
}
function check() {
var more = $("#show-more-button:visible");
if (more.length) {
more.click();
window.scrollBy(0, 1000000);
setTimeout(check, 3000);
} else {
clean();
if (sort) {
console.debug("Done, sorting.");
$(".my-account-list-table tbody").replaceWith(
$('.my-account-purchase-row').sort(compareByPrice)
);
}
window.scrollTo(0, 0);
}
}
check();
A bookmarklet is a script that stays on the Bookmarks Bar waiting to be clicked to execute.
To use a bookmarklet:- Drag and drop the link to the Bookmarks Bar.
- Navigate to the page it’s designed to run on.
- Click it to execute.
Bookmarklets tend to rot over time if the owner changes the website, please report to me if it’s broken. ↩