Greasy Fork is available in English.
Fixes SGW, primarily by removing things that don't matter.
当前为
// ==UserScript==
// @name SGW Fixer
// @namespace http://greasyfork.icu
// @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
// ==/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("<div id='upsDivisor' style='display:none;'>" + upsDivisor + "</div>");
var shippingOptions = "";
var buttonCount = 0;
$.each( shippingMethods, function( key, value ) {
if (buttonCount > 5) {
shippingOptions = shippingOptions + "<br><br>";
buttonCount = 0;
}
shippingOptions = shippingOptions + "<span style='border: 1px solid #CCCCCC; background-color:#EEEEEE; padding: 3px;' id='" + key + "' class='shipCharge'>" + key + "</span> ";
buttonCount++;
});
re = new RegExp("(ry Sn)","gi");
if(re.exec($(".smtext").html())) {
$("b:contains('Shipping Method')").before("<div id='shippingOptions' style='position:relative;padding-bottom:20px;padding-top:10px;font-size:14px'></div>");
} else {
$("b:contains('Shipping Charge')").before("<div id='shippingOptions' style='position:relative; bottom:40px;font-size:14px'></div>");
}
$("body").prepend("<div id='boxDefinitions' style='display:none;'></div>");
$("#boxDefinitions").data(shippingMethods);
$('input[name="itemNoCombineShipping"]').attr('checked', true);
$('input[name="itemAutoInsurance"]').attr( "disabled", false );
$('input[name="itemNoCombineShipping"]').before('<div style="position:relative;"><div style="position: absolute;top:0;left:0;width: 200px;height:140px;background-color: blue;z-index:99;opacity:0;filter: alpha(opacity = 50)"></div></div>');
$('input[name="itemShippingPrice"]').before('<div id="shipPriceLock" style="position:relative;"><div style="position: absolute;top:0;left:0;width: 90px;height:22px;background-color: gray;z-index:99;opacity:0.2;filter: alpha(opacity = 50)"></div></div>');
$("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("<script type=text/javascript>function capsButton(){ var myText = $('input[name=itemTitle]').val(); var small = ['the', 'by', 'iPod', 'iPad', 'iMac', 'iTunes', 'w/', 'ft', 'in', 'at', 'or', 'lb', 'lbs']; var titleCase = function(str, glue){ glue = (glue) ? glue : ['of', 'for', 'and']; return str.replace(/(\w)(\w*)/g, function(_, i, r){ var j = i.toUpperCase() + (r != null ? r : ''); return (glue.indexOf(j.toLowerCase())<0)?j:j.toLowerCase(); }); }; var myNewTitle = titleCase(myText, small); var myNewTitle = myNewTitle.replace('• ', ''); $('input[name=itemTitle]').val(myNewTitle); $('input[name=itemTitle]').val(); }</script>");
$("strong:contains('Item Title')").prepend("<br>");
$("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(" <span style='border: 1px solid #CCCCCC; background-color:#EEEEEE; padding: 3px;' onclick='javascript:$(\"input[name=itemTitle]\").css(\"text-transform\", \"capitalize\");'>Capitalize</span><br>");
//$("input[name=itemTitle]").after(" <span style='border: 1px solid #CCCCCC; background-color:#EEEEEE; padding: 3px;' onclick='capsButton();'>Capitalize</span><br>");
var button1 = "<span style='border: 1px solid #CCCCCC; background-color:#EEEEEE; padding: 3px;'";
var button2 = "</span> ";
$('font:contains("Numbers and decimal point")').after("<br><br>" + button1 + "<span onclick='javascript:unlockShipCharge();' style='position:relative; left: 50px; margin:10px;'>Unlock shipping charge</span>" + button2 + "<br>");
shippingOptions = shippingOptions + "<br><br>" + button1 + "id='UPS'><b>UPS</b>" + button2;
shippingOptions = shippingOptions + "" + button1 + "id='pickupOnly'><b>Pickup Only</b>" + 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("<script>function capitalizeTitle{var myElement = $('input[name=itemTitle]'); var myName = myElement.attr('name'); var myText = myElement.val(); var small = ['the', 'by', 'iPod', 'iPad', 'iMac', 'iTunes', 'w/', 'ft', 'in', 'at', 'or', 'lb', 'lbs', 'of', 'for', 'and']; var titleCase = function(str, glue){ glue = (glue) ? glue : ['of', 'for', 'and']; return str.replace(/(\w)(\w*)/g, function(_, i, r){ var j = i.toUpperCase() + (r != null ? r : ''); return (glue.indexOf(j.toLowerCase())<0)?j:j.toLowerCase(); }); }; var myNewTitle = titleCase(myText, small); var myNewTitle = myNewTitle.replace('• ', ''); myElement.val(myNewTitle); myElement.val();}</script>");
html.innerHTML = html.innerHTML.replace("onblur", "alt");
html.innerHTML = html.innerHTML.replace(/<hr align="center" noshade="" width="350">/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, "<span id=\"qtyBox\" style=\"display:none;\"><input maxlength=\"3\" name=\"itemQuantity\" size=\"3\" value=\"1\"></span></strong>");
html.innerHTML = html.innerHTML.replace(/per item((.|\n)*): 3\.00/g, "");
html.innerHTML = html.innerHTML.replace(/Bid Increment((.|\n)*)10\.00/g, "<span id=\"bidBox\" style=\"display:none;\"><input maxlength=\"11\" name=\"itemBidIncrement\" size=\"11\" value=\"1\"><input maxlength=\"11\" name=\"itemReserve\" size=\"11\" value=\"0\"><input maxlength=\"11\" name=\"itemBuyNowPrice\" size=\"11\" value=\"0\"></span></strong>");
html.innerHTML = html.innerHTML.replace(/<input maxlength="6" name="itemWeight" size="6">/g, "<input maxlength=\"6\" name=\"itemWeight\" size=\"6\" REQUIRED>");
html.innerHTML = html.innerHTML.replace(/<input maxlength="6" name="itemDisplayWeight" size="6">/g, "<input maxlength=\"6\" name=\"itemDisplayWeight\" size=\"6\" REQUIRED>");
html.innerHTML = html.innerHTML.replace(/Box Selection((.|\n)*)willing to ship your item\./g, "<span id=\"boxBox\" style=\"display:none;\"><select name=\"itembox\"><option value=\"-1\">No Boxes Defined</option></select><select name=\"itemShipping\" id=\"itemShipping\" size=\"1\"><option value=\"2\">U.S. and Canada Only</option><option value=\"0\" selected=\"\">No international shipments (U.S. Only)</option><option value=\"1\">Will ship internationally</option></select></span></strong></b>")
html.innerHTML = html.innerHTML.replace(/Handling Charge((.|\n)*)final item selling price\)\./g, "</strong><span id=\"handleBox\" style=\"display:none;\"><input maxlength=\"11\" name=\"itemHandlingPrice\" size=\"11\" value=\"2\"></span></b>");
html.innerHTML = html.innerHTML.replace(/<input name="itemNoCombineShipping" value="ON" type="checkbox">/g, "</strong><input name=\"itemNoCombineShipping\" value=\"ON\" type=\"checkbox\" tabindex=\"-1\" CHECKED></strong>");
html.innerHTML = html.innerHTML.replace(/<i>Example: 1<\/i>/g, "");
html.innerHTML = html.innerHTML.replace(/<a href="tools\/UPSdimweightcalculator.asp" target="_blank">here<\/a>/g, "<a href=\"tools/UPSdimweightcalculator.asp\" target=\"_blank\" tabindex=\"-1\">here</a>");
html.innerHTML = html.innerHTML.replace(/<a href="tools\/uspsdimweight1.asp" target="_blank">here<\/a>/g, "<a href=\"tools/uspsdimweight1.asp\" target=\"_blank\" tabindex=\"-1\">here</a>");
html.innerHTML = html.innerHTML.replace(/<select name="itemStartOffset" size="1">/g, "<select name=\"itemStartOffset\" size=\"1\" tabindex=\"-1\">");
html.innerHTML = html.innerHTML.replace(/<select name="itemstarttime" size="1">/g, "<select name=\"itemstarttime\" size=\"1\" tabindex=\"-1\">");
html.innerHTML = html.innerHTML.replace(/<select name="itemDuration" size="1">/g, "<select name=\"itemDuration\" size=\"1\" tabindex=\"-1\">");
html.innerHTML = html.innerHTML.replace(/<select name="itemEndTime" size="1">/g, "<select name=\"itemEndTime\" size=\"1\" tabindex=\"-1\">");
html.innerHTML = html.innerHTML.replace(/<select name="itemShipMethod" id="itemShipMethod" onchange="modify()">/g, "<select name=\"itemShipMethod\" id=\"itemShipMethod\" onchange=\"modify()\" tabindex=\"-1\">");
html.innerHTML = html.innerHTML.replace(/<input id="itemAutoInsurance" name="itemAutoInsurance" value="ON" disabled="true" type="checkbox">/g, "<input id=\"itemAutoInsurance\" name=\"itemAutoInsurance\" value=\"ON\" disabled=\"true\" type=\"checkbox\" tabindex=\"-1\">");
$("input[name=itemTitle]").val("");
html2.innerHTML = html2.innerHTML.replace(/Press <input tabindex="-99" id="reset1" name="reset1" type="reset" value="Reset Form">((.|\n)*) to start over\./g, "");
html2.innerHTML = html2.innerHTML.replace(/<input tabindex="-99" id="reset1" name="reset1" value="Reset Form" type="reset">/g, "<input tabindex=\"-99\" id=\"reset1\" name=\"reset1\" value=\"Reset Form\" type=\"reset\" style=\"display:none;\">");
html2.innerHTML = html2.innerHTML.replace(/Press to((.|\n)*)start over./g, "");
// html2.innerHTML = html2.innerHTML.replace(/<input id="submit1" name="submit1" value="Review Item" type="submit">/g, "<input id=\"submit1\" name=\"submit1\" value=\"Review Item\" type=\"submit\" disabled>");
html2.innerHTML = html2.innerHTML.replace(/<input id="submit1" name="submit1" value="Review Item" type="submit">/g, "<input id=\"submit1\" name=\"submit1\" value=\"Review Item\" type=\"submit\">");
//$("#form1").append("<div id='warnings' style='position:relative; left:100px;'><b><font size=5>Please enter a title.<br>Please enter a store number.<br>Please enter a location.<br></font></b></div>");
$.each( shippingMethods, function( key, value ) {
if (value['tooltip']) {
$("span:contains('" + key + "')").attr('title', value['tooltip']);
// $("span:contains('" + key + "')").remove();
console.log(key);
}
});
// $( "#form1" ).append("<script>function doUPS(){if($(\"#itemShipMethod\").val()>0||$('input[name=\"itemShippingPrice\"]').val()>0)if($(\"#itemShipMethod\").val()==0&&$('input[name=\"itemShippingPrice\"]').val()>0&&alert(\"This item was set to pickup only - are you sure you want to switch to a flat USPS rate?\"),$('input[name=\"itemShippingPrice\"]').val()<1){for(var e=document.getElementsByTagName(\"input\"),t=0;t<e.length;t++)e[t].id&&\"itemAutoInsurance\"==e[t].id&&(e[t].checked=!1);for(var i=document.getElementsByTagName(\"select\"),t=0;t<i.length;t++)i[t].id&&\"itemShipMethod\"==i[t].id&&(i[t].selectedIndex=2);$(\"#itemShipMethod\").val(2)}else{for(var e=document.getElementsByTagName(\"input\"),t=0;t<e.length;t++)e[t].id&&\"itemAutoInsurance\"==e[t].id&&(e[t].checked=!0,e[t].disabled=!1);for(var i=document.getElementsByTagName(\"select\"),t=0;t<i.length;t++)i[t].id&&\"itemShipMethod\"==i[t].id&&(i[t].selectedIndex=3);$(\"#itemShipMethod\").val(3)}}$(document).ready(function(){$(\"input[name=itemShippingPrice]\").change(function(){$(\"input[name=itemShippingPrice]\");doUPS()}),$(\".shipCharge\").click(function(){var e=0;if(\"smallFlat\"==this.id)e=\"5.95\";else if(\"medFlat\"==this.id)e=\"12.35\";else if(\"lightClothes\"==this.id)e=\"4.99\";else if(\"medClothes\"==this.id)e=\"6.99\";else if(\"media\"==this.id){var t=$(\"input[name=itemDisplayWeight]\").val();t>0&&(3>=t?e=\"3.99\":6>=t?e=\"5.99\":10>=t?e=\"7.99\":13>=t?e=\"8.99\":15>=t?e=\"9.99\":20>t?e=\"11.99\":25>t&&(e=\"15.99\"))}$(\"input[name=itemShippingPrice]\").val(e),doUPS()}),$(\"#UPS\").click(function(){$(\"#itemAutoInsurance\").attr(\"disabled\",!0),$(\"#itemAutoInsurance\").attr(\"checked\",!1),$(\"#itemShipMethod option[value=3]\").attr(\"selected\",!1),$(\"#itemShipMethod option[value=2]\").attr(\"selected\",\"selected\"),$(\"#itemShipMethod\").val(2)}),$(\"#pickupOnly\").click(function(){$(\"#itemAutoInsurance\").attr(\"disabled\",!0),$(\"#itemAutoInsurance\").attr(\"checked\",!1),$(\"#itemShipMethod option[value=3]\").attr(\"selected\",!1),$(\"#itemShipMethod option[value=2]\").attr(\"selected\",!1),$(\"#itemShipMethod option[value=0]\").attr(\"selected\",\"selected\"),$(\"#itemShipMethod\").val(0)}),$(\"input\").focusout(function(){doUPS()}) }); function unlockShipCharge(){ $('#shipPriceLock').remove(); } </script>");
$( "#form1" ).append("<script>function doUPS(){if($(\"#itemShipMethod\").val()>0||$('input[name=\"itemShippingPrice\"]').val()>0)if(0==$(\"#itemShipMethod\").val()&&$('input[name=\"itemShippingPrice\"]').val()>0&&alert(\"This item was set to pickup only - are you sure you want to switch to a flat USPS rate?\"),$('input[name=\"itemShippingPrice\"]').val()<1){for(var e=document.getElementsByTagName(\"input\"),t=0;t<e.length;t++)e[t].id&&\"itemAutoInsurance\"==e[t].id&&(e[t].checked=!1);for(var i=document.getElementsByTagName(\"select\"),t=0;t<i.length;t++)i[t].id&&\"itemShipMethod\"==i[t].id&&(i[t].selectedIndex=2);$(\"#itemShipMethod\").val(2)}else{for(var e=document.getElementsByTagName(\"input\"),t=0;t<e.length;t++)e[t].id&&\"itemAutoInsurance\"==e[t].id&&(e[t].checked=!0);for(var i=document.getElementsByTagName(\"select\"),t=0;t<i.length;t++)i[t].id&&\"itemShipMethod\"==i[t].id&&(i[t].selectedIndex=3);$(\"#itemShipMethod\").val(3)}}function unlockShipCharge(){$(\"#shipPriceLock\").remove()}$(document).ready(function(){$(\"input[name=itemShippingPrice]\").change(function(){$(\"input[name=itemShippingPrice]\");doUPS()}),$(\".shipCharge\").click(function(){var e=0;myBoxes=$(\"#boxDefinitions\").data();var t=$(\"input[name=itemDisplayWeight]\").val();if(t.length||(t=prompt(\"Item's weight?\",\"\"),$(\"input[name=itemDisplayWeight]\").val(t),\"UPS\"!=myBoxes[this.id].method?$(\"input[name=itemWeight]\").val(t):myBoxes[this.id].weight||$(\"input[name=itemWeight]\").val().length||$(\"input[name=itemWeight]\").val(prompt(\"Item's shipping weight?\"))),\"Media\"==this.id){t>0&&(3>=t?e=\"3.99\":6>=t?e=\"5.99\":10>=t?e=\"7.99\":13>=t?e=\"8.99\":15>=t?e=\"9.99\":20>t?e=\"11.99\":25>t&&(e=\"15.99\")),$(\"input[name=itemWeight]\").val().length||$(\"input[name=itemWeight]\").val($(\"input[name=itemDisplayWeight]\").val())}else myBoxes[this.id].price&&(e=myBoxes[this.id].price,$(\"input[name=itemWeight]\").val().length||($(\"input[name=itemDisplayWeight]\").val().length?$(\"input[name=itemWeight]\").val($(\"input[name=itemDisplayWeight]\").val()):($(\"input[name=itemDisplayWeight]\").val(1),$(\"input[name=itemWeight]\").val(1)))),myBoxes[this.id].weight&&$(\"input[name=itemWeight]\").val(myBoxes[this.id].weight>$(\"input[name=itemDisplayWeight]\").val()?myBoxes[this.id].weight:Number($(\"input[name=itemDisplayWeight]\").val())+2);$(\"#itemSellerInfo\").html(\"UPS\"!=this.id&&\"pickupOnly\"!=this.id?myBoxes[this.id].note:\"\"),\"UPS\"==myBoxes[this.id].method&&($(\"#itemAutoInsurance\").attr(\"disabled\",!1),$(\"#itemAutoInsurance\").attr(\"checked\",!1),$(\"#itemShipMethod option[value=3]\").attr(\"selected\",!1),$(\"#itemShipMethod option[value=2]\").attr(\"selected\",\"selected\"),$(\"#itemShipMethod\").val(2)),$(\"input[name=itemShippingPrice]\").val(e),doUPS()}),$(\"#UPS\").click(function(){var e=$(\"input[name=itemWeight]\").val(),t=$(\"input[name=itemDisplayWeight]\").val();(!t.length||100==$(\"input[name=itemWeight]\").val()&&100==$(\"input[name=itemDisplayWeight]\").val())&&(t=prompt(\"Item's actual weight?\")),(!e.length||100==$(\"input[name=itemWeight]\").val()&&100==$(\"input[name=itemDisplayWeight]\").val())&&(e=prompt(\"Item's shipping weight?\")),$(\"input[name=itemWeight]\").val(e),$(\"input[name=itemDisplayWeight]\").val(t),$(\"#itemAutoInsurance\").attr(\"disabled\",!1),$(\"#itemAutoInsurance\").attr(\"checked\",!1),$(\"#itemShipMethod option[value=3]\").attr(\"selected\",!1),$(\"#itemShipMethod option[value=2]\").attr(\"selected\",\"selected\"),$(\"#itemShipMethod\").val(2)}),$(\"#pickupOnly\").click(function(){$(\"input[name=itemDisplayWeight]\").val().length||$(\"input[name=itemDisplayWeight]\").val(100),$(\"input[name=itemWeight]\").val().length||$(\"input[name=itemWeight]\").val(100),$(\"#itemAutoInsurance\").attr(\"disabled\",!1),$(\"#itemAutoInsurance\").attr(\"checked\",!1),$(\"#itemShipMethod option[value=3]\").attr(\"selected\",!1),$(\"#itemShipMethod option[value=2]\").attr(\"selected\",!1),$(\"#itemShipMethod option[value=0]\").attr(\"selected\",\"selected\"),$(\"#itemShipMethod\").val(0)}),$(\"input\").focusout(function(){doUPS()})});</script>");
$('body').append('<script id="filter">$(document).ready(function(){alert(), var t,e=document.URL,i=[],s=document.URL.split("?")[1];if(void 0!=s){s=s.split("&");for(var r=0;r<s.length;r++)t=s[r].split("="),i.push(t[1]),i[t[0]]=t[1]}e.search("listerpostings")&&"justMe"==i.filter&&alert()});</script>');
$("#form1").append("<script id='disclaimersWarning'>$(document).ready(function(){ rand = Math.floor((Math.random() * 3) + 1); if(rand==1){ $('#warnings').show(); }$('#itemGallery').click(function(){ alert(\"Have you included all relevant disclaimers?\") }); });</script>")
$("#form1").append("<script id='availChars'>function titleAvailChars() {var length = $('input[name=itemTitle]').val().length; var remaining = 50 - length; ('myCounter').html(remaining); </script>");
$('input[name="itemShippingPrice"]').prop('disabled', false);
$('p:contains("verification")').before("<div id='warnings' style='display:none;'><font size=5 color=red>Remember to review your item's photos and description on the review screen.<br></font><font size=3 color=red>If something looks strange with an item on the review screen, <b>do not post it.</b> Please get a manager.<br><br></div>")
} else {
$("body").append("butts");
}