Changeset 31350 for other-projects/hathitrust
- Timestamp:
- 2017-01-24T21:41:15+13:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/hathitrust/wcsa/vol-checker/WebContent/HT-HTRC_Mashup.user.js
r31342 r31350 106 106 $results_a.find('.result').each(function() { 107 107 var $result_access_link = $(this).find('.result-access-link'); 108 console.log("*** result access link = " + $result_access_link.html());108 //console.log("*** result access link = " + $result_access_link.html()); 109 109 110 110 var $id_link = $result_access_link.find('ul>li>a').first(); … … 203 203 204 204 var action = $download_form.attr("action"); 205 var action_url = action; 206 // Extract hidden elems from, e.g. <input type="hidden" name="c" value="464226859" /><input type="hidden" name="a" value="download" /><input type="hidden" name="format" value="text" /> 205 //var action_url = action; 206 207 var action_url = https_servlet_url + "VolumeCheck"; 208 209 // Extract hidden elems from, e.g. 210 // <input type="hidden" name="c" value="464226859" /> 211 // <input type="hidden" name="a" value="download" /> 212 // <input type="hidden" name="format" value="text" /> 207 213 var $hidden_inputs = $download_form.find("input[type=\"hidden\"]"); 208 214 for (var i=0; i<$hidden_inputs.length; i++) { 209 215 var hidden_input = $hidden_inputs[i]; 210 //console.log("**** i: " + i + " val = " + $hidden_inputs[i]);211 216 212 217 if (i===0) { … … 216 221 action_url += "&"; 217 222 } 223 218 224 var $hidden_input = $(hidden_input); 219 action_url += $hidden_input.attr("name") + "=" + $hidden_input.attr("value"); 220 221 //console.log("download form: " + $hidden_input.attr("name") + "=" + $hidden_input.attr("value")); 225 var hi_name = $hidden_input.attr("name"); 226 var hi_val = $hidden_input.attr("value"); 227 if (hi_name === "c") { 228 hi_name = "convert-col"; 229 } 230 action_url += hi_name + "=" + hi_value; 231 222 232 } 223 233 224 234 225 235 console.log("workset download url: " + action_url); 226 //window.location.href = action_url;236 window.location.href = action_url; 227 237 }); 228 238
Note:
See TracChangeset
for help on using the changeset viewer.