Greasy Fork is available in English.

AliExpress Review Fix

fixes the 'review' button function and if a product has reviews, they will automatically be displayed on page load

  1. // ==UserScript==
  2. // @name AliExpress Review Fix
  3. // @namespace https://greasyfork.org/en/users/10118-drhouse
  4. // @version 1.1
  5. // @description fixes the 'review' button function and if a product has reviews, they will automatically be displayed on page load
  6. // @match https://www.aliexpress.com/*
  7. // @require https://code.jquery.com/jquery-3.7.0.min.js
  8. // @grant GM_info
  9. // @author drhouse
  10. // @license CC-BY-NC-SA-4.0
  11. // @icon https://www.google.com/s2/favicons?sz=64&domain=aliexpress.com
  12. // ==/UserScript==
  13. /* global jQuery, $ */
  14. this.$ = this.jQuery = jQuery.noConflict(true);
  15. (function($){
  16. var numReviews = $("#root > div.pdp-wrap.pdp-body > div.pdp-body-left > div.pdp-info > div.pdp-info-right > div > a").text()
  17. numReviews = parseInt(numReviews.match(/\d+/)[0]);
  18.  
  19. if (numReviews > 0){
  20. $('html, body').animate({scrollTop:$(document).height()}, 'fast');
  21. setTimeout(function(){
  22. $("#nav-review > div.ae-evaluation-list > div.ae-evaluation-view-more > button")[0].click()
  23. $('html, body').animate({scrollTop:0}, 'fast');
  24. }, 1000);
  25. }
  26.  
  27. var review = $("#root > div.pdp-wrap.pdp-body > div.pdp-body-left > div.pdp-info > div.pdp-info-right > div.product-reviewer > a")
  28.  
  29. $(review).click(function(event){
  30. event.preventDefault();
  31. $("#nav-review > div.ae-evaluation-list > div.ae-evaluation-view-more > button").click()
  32. });
  33.  
  34. })(jQuery);