rAthus

f*ck Aliexpress bundles!

Aug 8th, 2024 (edited)
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         f*ck Aliexpress bundles!
  3. // @namespace    http://tampermonkey.net/
  4. // @version      2025-01-15
  5. // @description  f*ck Aliexpress bundles!
  6. // @author       rAthus
  7. // @match        https://*.aliexpress.com/w/*
  8. // @match        https://*.aliexpress.com/gcp/*
  9. // @match        https://*.aliexpress.com/*/BundleDeals*
  10. // @icon         https://www.google.com/s2/favicons?sz=64&domain=aliexpress.com
  11. // @grant        none
  12. // @require      https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js
  13. // ==/UserScript==
  14.  
  15. (function() {
  16.     'use strict';
  17.     setInterval(function() {
  18.         // search results page
  19.         jQuery('a.search-card-item[href*="BundleDeals"]:not(.unbundled)').each(function(){
  20.             var href = jQuery(this).attr('href');
  21.             var id = href.split('productIds=')[1].split(':')[0];
  22.             var newHref = '/item/'+id+'.html';
  23.             jQuery(this).attr('href',newHref).on('click',function(e) {
  24.                 e.preventDefault();
  25.                 location.href = $(this).attr('href');
  26.                 return false;
  27.             });
  28.             jQuery(this).append('<center style="background:#E3E829;padding:10px;">unbundled!</center>').addClass('unbundled');
  29.         });
  30.         // bundle listing page
  31.         jQuery('.productContainer[id]:not(.unbundled)').each(function(){
  32.             var id = jQuery(this).attr('id');
  33.             var newHref = '/item/'+id+'.html';
  34.             jQuery(this).attr('href',newHref).on('click',function(e) {
  35.                 e.preventDefault();
  36.                 location.href = $(this).attr('href');
  37.                 return false;
  38.             });;
  39.             jQuery(this).append('<center style="background:#E3E829;padding:10px;">unbundled!</center>').addClass('unbundled');
  40.         });
  41.     },250);
  42. })();
Advertisement
Add Comment
Please, Sign In to add comment