Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name duel line google search
- // @version 3.14
- // @description search 2 line from a hit on google
- // @updateurl http://userscripts.org/
- // @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
- // @match https://s3.amazonaws.com/*
- // @match https://www.mturkcontent.com/*
- // @grant none
- // @copyright no thanks i'm full
- // ==/UserScript==
- //store links for iframe src
- var dealurl = "http://www.google.com/search?q=";
- var query = encodeURIComponent($("td").eq(1).text());
- var address = encodeURIComponent($("td").eq(5).text());
- dealurl += query + ' ' + address + ' ' ;
- //focus before new page opens
- $("input[name=web_url]").focus();
- //get screen dimensions, divide width, open and position new window, return focus
- var w = screen.availWidth/2;
- var h = screen.availHeight;
- myWindow = window.open(dealurl, 'Search Page', 'width='+w+', height='+h+', scrollbars=yes, toolbar=yes');
- myWindow.moveTo(w,0);
- myWindow.blur();
- self.focus();
- $('#mturk_form').submit(function(evt){
- myWindow.close();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement