Skip to content

Instantly share code, notes, and snippets.

@edds
Last active August 29, 2015 14:26
Show Gist options
  • Save edds/f9bb2cce92bcb913abb7 to your computer and use it in GitHub Desktop.
Save edds/f9bb2cce92bcb913abb7 to your computer and use it in GitHub Desktop.

Evans will price match a collection of stores this is an easy way to open a tab for each of those stores so you can get the best deal.

To create a new bookmark and then edit the bookmark and replace the location with the JavaScript below (or use something like this with the raw JavaScript from below).

javascript:(function()%7Bvar%20sites%20%3D%20%5B%22http%3A%2F%2Fwww.alansbmx.com%2Fadvancedsearch.aspx%3FTerm%3D%25s%22%2C%22http%3A%2F%2Fbikes.alpinebikes.com%2Fsearch%3Fw%3D%25s%22%2C%22http%3A%2F%2Fwww.allterraincycles.co.uk%2FSearch%3Fq%3D%25s%22%2C%22http%3A%2F%2Fwww.chainreactioncycles.com%2Fs%3Fq%3D%25s%22%2C%22http%3A%2F%2Fwww.currys.co.uk%2Fgbuk%2Fsearch-keywords%2Fxx_xx_xx_xx_xx%2F%25s%2Fxx-criteria.html%22%2C%22http%3A%2F%2Fsearch.cyclesurgery.com%2Fsearch%3Fw%3D%25s%22%2C%22http%3A%2F%2Fwww.cyclesuk.com%2FSearchResults.aspx%3FSearch%3D%25s%22%2C%22https%3A%2F%2Fwww.cyclestore.co.uk%2FproductSearch.asp%3Ffreetext%3D%25s%22%2C%22http%3A%2F%2Fwww.edinburghbicycle.com%2Fbrowse%3FkeywordFilter%3D%25s%22%2C%22http%3A%2F%2Fwww.halfords.com%2Fwebapp%2Fwcs%2Fstores%2Fservlet%2FSearchCmd%3Faction%3Dsearch%26storeId%3D10001%26catalogId%3D10151%26langId%3D-1%26srch%3D%25s%22%2C%22http%3A%2F%2Fwww.hargrovescycles.co.uk%2Fcatalogsearch%2Fresult%2F%3Fcat%3D0%26q%3D%25s%22%2C%22http%3A%2F%2Fwww.jejamescycles.co.uk%2Findex.html%3Fsearch%3D%25s%22%2C%22http%3A%2F%2Fwww.jessops.com%2Fsearch%3Fq%3D%25s%22%2C%22http%3A%2F%2Fwww.rapha.cc%2Fgb%2Fen%2Fsearch%3Fsearch_type%3Dproduct%26text%3D%25s%22%2C%22http%3A%2F%2Fsearch.leisurelakesbikes.com%2Fsearch%3Fw%3D%25s%22%2C%22http%3A%2F%2Fbikes.merlincycles.com%2Fsearch%3Fw%3D%25s%22%2C%22http%3A%2F%2Fwww.probikekit.co.uk%2Felysium.search%3Fsearch%3D%25s%22%2C%22http%3A%2F%2Fwww.ribblecycles.co.uk%2Fproduct%2Ft%2F%25t%22%2C%22http%3A%2F%2Fwww.rutlandcycling.com%2Fadvancedsearch.aspx%3FTerm%3D%25s%22%2C%22http%3A%2F%2Fwww.sjscycles.co.uk%2Ffind.asp%3Fsite%3D%26name%3D%25s%22%2C%22http%3A%2F%2Fwww.tredz.co.uk%2Fsearch%2F%25s%22%2C%22http%3A%2F%2Fwww.ukbikestore.co.uk%2Fproduct%2Fproductlist.aspx%3Fterm%3D%25s%22%2C%22http%3A%2F%2Fwww.wiggle.co.uk%2F%3Fs%3D%25s%22%2C%22http%3A%2F%2Fwww.winstanleysbmx.com%2Findex.html%3Faction%3Dsearch%26searchOpt%3Dlike%26searchtype%3DprodNameID%26quicksearch%3D%25s%22%5D%3Bvar%20a%20%3D%20document.createElement('a')%3Ba.setAttribute('target'%2C%20'_blank')%3Bvar%20product%20%3D%20window.prompt('Search%20term%3A'%2C%20document.querySelector('.main-title').innerText)%3Bfor(site%20in%20sites)%7Ba.href%20%3D%20sites%5Bsite%5D.replace('%25s'%2C%20product.replace(%2F%20%2Fg%2C%20'%2B')).replace('%25t'%2C%20product)%3Ba.click()%3B%7D%7D)();

var sites = ["http://www.alansbmx.com/advancedsearch.aspx?Term=%s",
"http://bikes.alpinebikes.com/search?w=%s",
"http://www.allterraincycles.co.uk/Search?q=%s",
"http://www.chainreactioncycles.com/s?q=%s",
"http://www.currys.co.uk/gbuk/search-keywords/xx_xx_xx_xx_xx/%s/xx-criteria.html",
"http://search.cyclesurgery.com/search?w=%s",
"http://www.cyclesuk.com/SearchResults.aspx?Search=%s",
"https://www.cyclestore.co.uk/productSearch.asp?freetext=%s",
"http://www.edinburghbicycle.com/browse?keywordFilter=%s",
"http://www.halfords.com/webapp/wcs/stores/servlet/SearchCmd?action=search&storeId=10001&catalogId=10151&langId=-1&srch=%s",
"http://www.hargrovescycles.co.uk/catalogsearch/result/?cat=0&q=%s",
"http://www.jejamescycles.co.uk/index.html?search=%s",
"http://www.jessops.com/search?q=%s",
"http://www.rapha.cc/gb/en/search?search_type=product&text=%s",
"http://search.leisurelakesbikes.com/search?w=%s",
"http://bikes.merlincycles.com/search?w=%s",
"http://www.probikekit.co.uk/elysium.search?search=%s",
"http://www.ribblecycles.co.uk/product/t/%t",
"http://www.rutlandcycling.com/advancedsearch.aspx?Term=%s",
"http://www.sjscycles.co.uk/find.asp?site=&name=%s",
"http://www.tredz.co.uk/search/%s",
"http://www.ukbikestore.co.uk/product/productlist.aspx?term=%s",
"http://www.wiggle.co.uk/?s=%s",
"http://www.winstanleysbmx.com/index.html?action=search&searchOpt=like&searchtype=prodNameID&quicksearch=%s"];
var a = document.createElement('a');
a.setAttribute('target', '_blank');
var product = window.prompt('Search term:', document.querySelector('.main-title').innerText);
for(site in sites){
a.href = sites[site].replace('%s', product.replace(/ /g, '+')).replace('%t', product);
a.click();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment