小编use*_*640的帖子

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

我想从中获取一个值https://play.google.com/store/account*,这使得用户页面通过其输出.例如:
/store/account?start=0&num=40,然后/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 {
            totalPrice  = parseFloat (GM_getValue ("TotalPrice", 0) );
        }

        $("#tab-body-account .rap-link").each( function () {
            var price   = $(this).attr ("data-docprice").replace (/[^\d\.]/g, …
Run Code Online (Sandbox Code Playgroud)

javascript jquery greasemonkey mashup

4
推荐指数
1
解决办法
3488
查看次数

CSS背景色关键帧动画

我正在尝试为firefox(主题)中的工具栏背景颜色设置一个简单的淡入/淡出动画.问题是,我的颜色完全消失到透明.我希望我的颜色在中途褪色,然后开始缓和回到全彩色.

我列出了我试过的代码......

toolbar{
    animation-name: animation;
    animation-duration: 5s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;    
    animation-play-state: running;
}

@keyframes animation {
    50.0%  {background-color:red;}
}
Run Code Online (Sandbox Code Playgroud)

我试图摆弄不透明度设置,没有运气.任何帮助表示赞赏.

css firefox animation

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

animation ×1

css ×1

firefox ×1

greasemonkey ×1

javascript ×1

jquery ×1

mashup ×1