swdyh (owner)

Forks

Revisions

gist: 146093 Download_button fork
public
Public Clone URL: git://gist.github.com/146093.git
Embed All Files: show embed
autopagerizegoogleimagef.user.js #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// ==UserScript==
// @name AutoPagerizeGoogleImageFilter
// @namespace http://relucks.org/
// @include http://images.google.*
// ==/UserScript==
 
// http://userscripts.org/topics/22000
// {
// url: 'http://images\\.google\\.(\\w|\\.)+/images\\?',
// nextLink: 'id("navbar")//td[last()]/a',
// pageElement: 'id("navbar")/preceding-sibling::*',
// exampleUrl: ''
// }
 
(function() {
    var reqfl = function(opt) {
        if (opt.url.indexOf('gbv=2') == -1) {
            opt.url += '&gbv=1'
        }
        else {
            opt.url = opt.url.replace('gbv=2', 'gbv=1')
        }
    }
    setTimeout(function() {
        if (window.AutoPagerize && window.AutoPagerize.addRequestFilter) {
            window.AutoPagerize.addRequestFilter(reqfl)
        }
    }, 0)
})()