Tag: mashup

Greasemonkey可以从分页的URL序列中获取值吗?

我想从https://play.google.com/store/account*获取一个值,该值会使用户页面通过其输出。 例如: /store/account?start=0&num=40 ,then /store/account?start=40&num=40等 现在,当我访问https://play.google.com/apps ,我希望Greasemonkey汇总/store/account页面中的值,然后在该页面上显示最终值。 下面列出的代码可以从/store/account页面总计我想要的值。 但是,我想将代码插入到用于第二个URL的脚本中,因此我可以将其添加到同一页面上。 // ==UserScript== // @name Google Play // @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js // @grant GM_setValue // @grant GM_getValue // ==/UserScript== var startParam = location.search.match (/\bstart=(\d+)/i); if (startParam) { var totalPrice = 0; var startNum = parseInt (startParam[1], 10); if (startNum === 0) { GM_setValue (“TotalPrice”, “0”); } else { […]