if( String( location ).indexOf( 'etsy.com/feedback_awaiting.php?style=bulk' ) == -1 ) { // not on the batch feedback page - stop working return } r = null; // store for the selected radio button value t = null; // store for the selected textarea value f = document.forms.feedback.elements; // form elements array // loop through all the form elements looking for feedback elements for( e = 0; e < f.length; e++ ) { m = f[ e ]; if( m.type == "radio" && m.name.indexOf( "feedback_value" ) == 0 ) { // feedback radio button // if we have a selected feedback value, and this matches it, select it if( r && m.value == r ) m.checked = true; // if we have no selected feedback value, and this radio is checked, use it as the value of choice if( !r ) if ( m.checked ) r = m.value; } if ( m.nodeName == "TEXTAREA" && m.name.indexOf( "feedback_message" ) == 0 ) { // if we have a selected feedback text, set the value of this textarea to it if( t != null ) m.value = t; // if we don't have a selected feedback text, stash this one if( t == null ) if( m.value != "" ) t = m.value; } }