Changeset 31682 for other-projects/meddle
- Timestamp:
- 2017-05-17T10:09:14+12:00 (7 years ago)
- Location:
- other-projects/meddle/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/meddle/trunk/index.html
r31628 r31682 51 51 --> 52 52 <li> 53 <a href="https://bedrock.resnet.cms.waikato.ac.nz/cgi-bin/meddle/nph-proxy-meddle.cgi/en/20/http/www.springer.com/gp/"> 54 <img class="dllogo" src="https://upload.wikimedia.org/wikipedia/en/thumb/e/eb/Springer.svg/1280px-Springer.svg.png" width="333"> 55 56 </a> 57 </li> 58 <li> 53 59 <a href="https://bedrock.resnet.cms.waikato.ac.nz/cgi-bin/meddle/nph-proxy-meddle.cgi/en/20/https/scholar.google.com/"> 54 60 <img class="dllogo" src="meddle-gscholar.png"> -
other-projects/meddle/trunk/meddle-fixup.js
r31628 r31682 289 289 detected_dl = "Google Scholar"; 290 290 } 291 else if (real_domain.match(/^www.springer\.com/)) { 292 detected_dl = "Springer"; 293 } 291 294 else if (real_domain.match(/^ieeexplore\.ieee\.org\//)) { 292 295 detected_dl = "IEEE Xplore"; … … 300 303 $('#dlcontextoptions').html('<font size="-1">'+dlcontextoptions+'</font>'); 301 304 305 return detected_dl; 302 306 } 303 307 … … 467 471 468 472 473 474 function fixupSpringerSubmit(evt) { 475 console.log( "spring-dl-fixup fixupSpringerSubmit(evt) called" ); 476 477 var event = evt || window.event; 478 event.preventDefault(); // to stop the form from submitting 479 480 var query_box = document.getElementById("query"); 481 var query_box_val = query_box.value; 482 483 query_box_val = opt_ligature_replacement(query_box_val); 484 485 query_box_val = opt_accent_fold(query_box_val); 486 //alert("*** q = " + query_box_val); 487 488 query_box.value = query_box_val; 489 490 var query_form = document.getElementById("global-search"); 491 492 _proxy_jslib_flush_write_buffers(); // is this needed? 493 //query_form.submit(); 494 document.createElement('form').submit.call(query_form); 495 496 //var $query_form = $("#global-search"); 497 //$query_form.submit(); 498 499 } 500 501 502 function fixupSpringerInit() { 503 504 console.log("Springer DOM tweaks initiated"); 505 506 var query_form = document.getElementById("global-search"); 507 if (query_form) { 508 query_form.onsubmit = fixupSpringerSubmit; 509 } 510 511 console.log("Springer DOM tweaks done"); 512 } 513 514 515 469 516 $(document).ready(function() { 470 517 console.log( "jquery DOM ready" ); 471 meddleInfoBox(); 472 473 acmdlFixupInit(); 474 //gscholarFixupInit(); 475 xploreFixupInit(); 518 var detected_dl = meddleInfoBox(); 519 520 if (detected_dl.match(/^ACM DL/)) { 521 acmdlFixupInit(); 522 } 523 else if (detected_dl.match(/^Google Scholar/)) { 524 gscholarFixupInit(); 525 } 526 //xploreFixupInit(); 527 else if (detected_dl.match(/^Springer/)) { 528 fixupSpringerInit(); 529 } 476 530 477 531 });
Note:
See TracChangeset
for help on using the changeset viewer.