Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

This is a discussion on Multiple critiera using custom search engines? within the Chrome Tips & Tricks section, part of the Google Chrome category: I managed to accomplish this using some (hacky and ugly!) javascript. Use the following as your "url": javascript :url='http://searchengine?term1=%0s&term2=%1s';parts='%s'.replace(/(%5C%5C)?\+/g, function($0,$1)%7Breturn($1?'+':'qzq')%7D).split('qzq');for(var ...


  1. #11
    NGC4594 is offline Junior Member
    Join Date
    Aug 2010
    Posts
    1

    Default

    I managed to accomplish this using some (hacky and ugly!) javascript. Use the following as your "url":

    javascript:url='http://searchengine?term1=%0s&term2=%1s';parts='%s'.replace(/(%5C%5C)?\+/g, function($0,$1)%7Breturn($1?'+':'qzq')%7D).split('qzq');for(var i=0; i < parts.length && (url=url.replace(new RegExp('%'+i+'s', 'g'),parts[i]));i++);location=url.replace(/%[0-9]s/g,'')
    I realise this is digging up an old thread, but I just wanted to let sammio5 know how brilliant his javascript hack for multiple search criteria is! I've been well impressed with Chrome since turning to it around 10 months ago, and this trick really adds worth to it. Cheers!

  2. #12
    hnbc34 is offline Junior Member
    Join Date
    Dec 2010
    Posts
    1

    Default

    Came up with this solution for this.

    Code:
    javascript:location='http://yoursite.com/' + '%s'.split(' ')[0] + '/' + '%s'.split(' ')[1] + '.htm'
    this will generate http://yoursite.com/argument1/argument2.htm

    you can add as many as you want or add anything else that is required to make it populate correctly.

  3. #13
    PAEz's Avatar
    PAEz is offline Moderator
    Join Date
    Aug 2009
    Location
    Australia
    Posts
    655

    Default

    Thats a real nice simple solution and works perfectly hnbc34.
    Its great to see a simple solution that I can understand and work with, so thanks.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Windows 7 Custom Jumplist
    By seiichi in forum Chrome Tips & Tricks
    Replies: 3
    Last Post: 02-24-2011, 02:26 PM
  2. Context Search And Search Engine Drop-down Box
    By chrome567 in forum Plugins Development
    Replies: 12
    Last Post: 11-06-2009, 07:59 PM
  3. Custom Search in ToolStrip
    By caveman.savant in forum Plugins Development
    Replies: 1
    Last Post: 09-18-2009, 06:21 PM
  4. Multiple Chrome processes
    By Excalibur in forum Chrome Troubleshooting
    Replies: 3
    Last Post: 05-14-2009, 12:29 AM
  5. Chrome Custom Mouse Gestures
    By Laoguy in forum Chrome Plugins
    Replies: 6
    Last Post: 04-15-2009, 06:52 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •