NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name PW (pw.mail.ru) cabinet promo items multi-selection // @namespace http://tampermonkey.net/ // @version 0.1 // @description Select all items in promo-items page (not only 6) // @author You // @match https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo // @icon https://www.google.com/s2/favicons?domain=google.com // @grant none // @license MIT // @include https://pw.mail.ru/promo_items.php // @updateURL https://openuserjs.org/meta/kirillorgazm/PW_(pw.mail.ru)_cabinet_promo_items_multi-selection.meta.js // @downloadURL https://openuserjs.org/install/kirillorgazm/PW_(pw.mail.ru)_cabinet_promo_items_multi-selection.user.js // @copyright 2021, kirillorgazm (https://openuserjs.org/users/kirillorgazm) // ==/UserScript== (function() { 'use strict'; // Your code here... $('.items_container input[type=checkbox]').click(function(){ var n = $(".items_container input:checked").length; if(n >= 50) { $(".items_container input[type=checkbox]:not(:checked)").attr("disabled", "disabled"); } else { $("input[type=checkbox], input[type=submit]").removeAttr("disabled"); } }); $('.item_input_block').mouseover(function(){ if($(this).find('input[type=checkbox]:not(:checked)').is(':disabled')){ $('.descr_block').show(); } else { $('.descr_block').hide(); } }); const items = document.getElementsByName('cart_items[]') for (let i = 0; i < items.length; i++) {items[i].click()} })();