// ==UserScript== // @name SGW Fixerrrrr // @namespace https://greasyfork.org // @include https://sellers.shopgoodwill.com* // @include http://localhost/sgw.html // @version 3.4.5 // @description Fixes SGW, primarily by removing things that don't matter. // @require http://code.jquery.com/jquery-2.1.3.js // @grant none // @downloadURL none // ==/UserScript== var upsDivisor = 225; // These are editable! Format is as follows: // // "Button name" : price, // // Important notes: // 1. Name MUST be in quotation marks. // 2. A comma MUST follow the price, var shippingMethods = { "Small flat rate box" : { "price" : 5.95, "note" : "Small flat rate box", "method" : "USPS" }, "Bubble mailer" : { "price" : 5.95, "note" : "Bubble mailer", "tooltip" : "Bubble mailers are padded, but consider if your item needs extra padding as well.", "method" : "USPS" }, "Medium flat rate box" : { "price" : 12.35, "note" : "Medium flat rate box", "method" : "USPS" }, "Light clothing mailer" : { "price" : 4.99, "note" : "Poly-mailer", "tooltip" : "Poly-mailer. Use if a clothing item is light - like a t-shirt.", "method" : "USPS" }, "Medium-weight clothing mailer" : { "price" : 6.99, "note" : "Poly-mailer", "tooltip" : "Poly-mailer. Use if a clothing item is a bit heavier - like a pair of jeans.", "method" : "USPS" }, "Media" : { "note" : "Media", "tooltip" : "Any: book; movie (VHS, DVD, Blu-Ray, laserdisc, film reel); music (record, 8-track, tape, CD) - regardless of size or weight. NOT comic books, magazines, newspapers, or video games.", "method" : "USPS" }, "Small guitar box" : { "note" : "6x18x44 guitar box", "tooltip" : "Interior dimensions: 6x18x44; shipping weight: " + Math.ceil((7*19*45)/upsDivisor), "weight" : Math.ceil((7*19*45)/upsDivisor), "method" : "UPS" }, "Large guitar box" : { "note" : "8x20x50 guitar box", "tooltip" : "Interior dimensions: 8x20x50; shipping weight: " + Math.ceil((9*21*51)/upsDivisor), "weight" : Math.ceil((9*21*51)/upsDivisor), "method" : "UPS" }, "Small print box" : { "note" : "5x24x30 print box", "tooltip" : "Interior dimensions: 5x24x30; shipping weight: " + Math.ceil((6*24*31)/upsDivisor), "weight" : Math.ceil((6*24*31)/upsDivisor), "method" : "UPS" }, "Large print box" : { "note" : "5x30x36 print box", "tooltip" : "Interior dimensions: 5x30x36; shipping weight: " + Math.ceil((6*31*37)/upsDivisor), "weight" : Math.ceil((6*31*37)/upsDivisor), "method" : "UPS" }, "8x8 long box" : { "note" : "8x8 long box", "tooltip" : "Interior dimensions: 8x8x?", "method" : "UPS" }, "12x12 long box" : { "note" : "12x12 long box", "tooltip" : "Interior dimensions: 8x8x?", "method" : "UPS" }, "Small coat box" : { "note" : "9x12x12 coat box", "tooltip" : "Interior dimensions: 9x12x12; shipping weight: " + Math.ceil((10*13*13)/upsDivisor), "weight" : Math.ceil((10*13*13)/upsDivisor), "method" : "UPS" }, "Medium coat box" : { "note" : "6x14x18 coat box", "tooltip" : "Interior dimensions: 6x14x18; shipping weight: " + Math.ceil((7*15*19)/upsDivisor), "weight" : Math.ceil((7*15*19)/upsDivisor), "method" : "UPS" }, "Very large coat box" : { "note" : "10x14x18 coat box", "tooltip" : "Interior dimensions: 10x14x18; shipping weight: " + Math.ceil((11*15*19)/upsDivisor), "weight" : Math.ceil((11*15*19)/upsDivisor), "method" : "UPS" }, "Standard small UPS box" : { "note" : "6.25x7.25x10.25 small box", "tooltip" : "Interior dimensions: 6.25x7.25x10.25; shipping weight: " + Math.ceil((7*8*11)/upsDivisor), "weight" : Math.ceil((7*8*11)/upsDivisor), "method" : "UPS", } }; // Okay, please don't mess with anything below here, though, if you aren't up on your javascript. // If you ARE up on your javascript... please don't judge. I learned as I went and vice-versa. >.> var url = document.URL; if (url.search("newAuctionItem")) { $("body").prepend(""); var shippingOptions = ""; var buttonCount = 0; $.each( shippingMethods, function( key, value ) { if (buttonCount > 5) { shippingOptions = shippingOptions + "

"; buttonCount = 0; } shippingOptions = shippingOptions + "" + key + "  "; buttonCount++; }); re = new RegExp("(ry Sn)","gi"); if(re.exec($(".smtext").html())) { $("b:contains('Shipping Method')").before("
"); } else { $("b:contains('Shipping Charge')").before("
"); } $("body").prepend(""); $("#boxDefinitions").data(shippingMethods); $('input[name="itemNoCombineShipping"]').attr('checked', true); $('input[name="itemAutoInsurance"]').attr( "disabled", false ); $('input[name="itemNoCombineShipping"]').before('
'); $('input[name="itemShippingPrice"]').before('
'); $("select[name=itemStartOffset]").attr('tabindex', "-1"); $("select[name=itemstarttime]").attr('tabindex', "-1"); $("select[name=itemDuration]").attr('tabindex', "-1"); $("select[name=itemEndTime]").attr('tabindex', "-1"); $("#itemShipMethod").attr('tabindex', "-1"); $('input[name="itemShippingPrice"]').attr('tabindex', "-1"); $('input[name="itemNoCombineShipping"]').attr('tabindex', "-1"); $("#itemAutoInsurance").attr('tabindex', "-1"); // Something is broken: having the above lines where they were (toward the bottom), they suddenly stopped working when the counter was fixed - moving them up caused them to work again... IDFK $("#WebWizRTE").height(500); $("#itemDescription").height(500); re = new RegExp("(ry Sn)","gi"); if(re.exec($(".smtext").html())) { $("#itemDescription").width(800); } $("#s1").attr("size", 100); $("strong:contains('Item Title')").prepend(""); $("strong:contains('Item Title')").prepend("
"); $("input[name=itemTitle]").attr("maxlength",50); $("input[name=itemTitle]").attr("onkeyup", "javascript: var length=$('input[name=itemTitle]').val().length,remaining=50-length;$('#myCounter').html(remaining);"); $("input[name=itemTitle]").attr("onkeypress", ""); $("#myCounter").html("50"); //$("input[name=itemTitle]").after(" Capitalize
"); //$("input[name=itemTitle]").after(" Capitalize
"); var button1 = "
" + button1 + "Unlock shipping charge" + button2 + "
"); shippingOptions = shippingOptions + "

" + button1 + "id='UPS'>UPS" + button2; shippingOptions = shippingOptions + "" + button1 + "id='pickupOnly'>Pickup Only" + button2; $("#shippingOptions").html(shippingOptions); var html = document.getElementById('form1').children[0].children[0].children[1].children[1]; var html2 = document.getElementById('form1').children[2].children[0].children[0].children[0]; html2.innerHTML = html2.innerHTML.replace(/You will be advised[\s\S]*place your listing[\s\S]*will be assessed[\s\S]*in the next screen\./g,""); $("p:contains('Make sure you know')").hide(); $("p:contains('Please review the')").hide(); $("p:contains('read shopgoodwill')").hide(); $("hr").hide(); // $("#form1").append(""); html.innerHTML = html.innerHTML.replace("onblur", "alt"); html.innerHTML = html.innerHTML.replace(/
/g,""); html.innerHTML = html.innerHTML.replace(/One line((.|\n)*)find your item\.|You may use((.|\n)*)do not use HTML\.|For |Dutch auctions((.|\n)*)selling a single set\.|This is the price((.|\n)*)and commas \(','\)|Bid increment is((.|\n)*)each bid\.|Reserve Price is((.|\n)*)Reserve Price!|Buy Now allows((.|\n)*)Buy Now!/g, ""); html.innerHTML = html.innerHTML.replace(/Item Quantity((.|\n)*)itemQuantity" size="3" value="1">/g, ""); html.innerHTML = html.innerHTML.replace(/per item((.|\n)*): 3\.00/g, ""); html.innerHTML = html.innerHTML.replace(/Bid Increment((.|\n)*)10\.00/g, ""); html.innerHTML = html.innerHTML.replace(//g, ""); html.innerHTML = html.innerHTML.replace(//g, ""); html.innerHTML = html.innerHTML.replace(/Box Selection((.|\n)*)willing to ship your item\./g, "") html.innerHTML = html.innerHTML.replace(/Handling Charge((.|\n)*)final item selling price\)\./g, ""); html.innerHTML = html.innerHTML.replace(//g, ""); html.innerHTML = html.innerHTML.replace(/Example: 1<\/i>/g, ""); html.innerHTML = html.innerHTML.replace(/here<\/a>/g, "here"); html.innerHTML = html.innerHTML.replace(/here<\/a>/g, "here"); html.innerHTML = html.innerHTML.replace(/"); html.innerHTML = html.innerHTML.replace(/"); html.innerHTML = html.innerHTML.replace(/"); html.innerHTML = html.innerHTML.replace(/"); html.innerHTML = html.innerHTML.replace(/"); html.innerHTML = html.innerHTML.replace(//g, ""); $("input[name=itemTitle]").val(""); html2.innerHTML = html2.innerHTML.replace(/Press ((.|\n)*) to start over\./g, ""); html2.innerHTML = html2.innerHTML.replace(//g, ""); html2.innerHTML = html2.innerHTML.replace(/Press to((.|\n)*)start over./g, ""); // html2.innerHTML = html2.innerHTML.replace(//g, ""); html2.innerHTML = html2.innerHTML.replace(//g, ""); //$("#form1").append("
Please enter a title.
Please enter a store number.
Please enter a location.
"); $.each( shippingMethods, function( key, value ) { if (value['tooltip']) { $("span:contains('" + key + "')").attr('title', value['tooltip']); // $("span:contains('" + key + "')").remove(); console.log(key); } }); // $( "#form1" ).append(""); $( "#form1" ).append(""); $('body').append(''); $("#form1").append("") $("#form1").append(""); $('input[name="itemShippingPrice"]').prop('disabled', false); $('p:contains("verification")').before("") } else { $("body").append("butts"); }