// ==UserScript== // @name Direct download from Google Play // @namespace StephenP // @version 1.4.2 // @description Adds APKMirror, APK-DL and Evozi download buttons to Google Play when browsing apps. This script is based on yurenchen's "google play apk downloader". // @author StephenP // @match https://play.google.com/store/apps/details?id=* // @match http://play.google.com/store/apps/details?id=* // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; pageURL=window.location; addButtons(); setInterval(checkReload, 5000); })(); function checkReload(){ alert(pageURL+" vs "+window.location); if(pageURL!=window.location){ addButtons(); } } function addButtons(){ if(document.getElementsByClassName("buy")[0].firstElementChild.firstElementChild.getElementsByTagName("META")[1].content==0){ var id=location.search.match(/id=(.*)/)[1]; var evoziURL='https://apps.evozi.com/apk-downloader/?id='+id; var apkdlURL='http://apkfind.com/store/captcha?app='+id; var apkmirrorURL='https://www.apkmirror.com/?post_type=app_release&searchtype=apk&s='+id; var menubutton=document.getElementsByClassName("action-bar-menu-button").length; var wlButton = document.createDocumentFragment(); wlButton.appendChild(document.getElementsByClassName("id-wishlist-display")[0]); var buttonslist; var html; if(menubutton!==0){ //menubutton==0 means there is no sliding menu, an element only occurring in mobile view. buttonslist = document.getElementsByClassName("details-actions")[0]; html='APK-DLEvoziAPKMirror'; } else{ buttonslist = document.getElementsByClassName("details-actions-right")[0]; html='APK-DLEvoziAPKMirror'; } buttonslist.innerHTML=buttonslist.innerHTML+html; buttonslist.appendChild(wlButton); } pageURL=window.location; }