Improve Just-Eat

Improves Just-Eat in various ways.

  1. // ==UserScript==
  2. // @name Improve Just-Eat
  3. // @description Improves Just-Eat in various ways.
  4. // @author Sebastian Paaske Tørholm
  5. // @include http://*just-eat.tld/*
  6. // @include http://*just-eat.dk/*
  7. // @version 1.0
  8. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js
  9. // @namespace https://greasyfork.org/users/4769
  10. // ==/UserScript==
  11.  
  12. // Make buttons in restaurant-listing normal links, not fancy JS stuff
  13. // (which means you can middle-click them, woo!)
  14. $('input[name$="ButtonOrderNow"]').each( function() {
  15. var target = ($(this).attr('onclick') + "").match(/location\.href='(.*?)'/)[1];
  16. $(this).removeAttr('onclick');
  17. $(this).get(0).type = 'button';
  18. $(this).wrap('<a href="'+target+'"></a>');
  19. });