Index: /other-projects/meddle/trunk/INSTALL.sh
===================================================================
--- /other-projects/meddle/trunk/INSTALL.sh	(revision 31626)
+++ /other-projects/meddle/trunk/INSTALL.sh	(revision 31627)
@@ -27,5 +27,5 @@
 /bin/cp index.* "$MEDDLE_WEBDIR/."
 /bin/cp meddle-fixup.js "$MEDDLE_WEBDIR/."
-/bin/cp meddle-icon-*.png "$MEDDLE_WEBDIR/."
+/bin/cp meddle-*.png "$MEDDLE_WEBDIR/."
 
 echo "Installing/Updating $MEDDLE_CGIDIR"
Index: /other-projects/meddle/trunk/index.css
===================================================================
--- /other-projects/meddle/trunk/index.css	(revision 31627)
+++ /other-projects/meddle/trunk/index.css	(revision 31627)
@@ -0,0 +1,56 @@
+body {
+    background-color: #999999;
+    font-size:14px;
+    font-family:Verdana, Arial, Helvetica, sans-serif;
+
+}
+
+div#outer {
+    width: 80%;
+    background-color:#FFFFFF;
+    margin-top: 30px;
+    margin-bottom: 30px;
+    margin-left: auto;
+    margin-right: auto;
+    padding: 0px;
+    border: thin solid #000000;
+
+}
+
+div#header {
+    padding-left: 15px;
+    margin: 0px;
+    /*text-align: center;*/
+
+}
+
+div#nav {
+    width: 25%;
+    padding: 10px;
+    margin-top: 1px;
+    float: left;
+
+}
+
+div#main {
+    margin-top: 1px;
+    padding-left: 15px;
+}
+
+div#footer {
+    padding: 15px;
+    margin: 0px;
+    border-top: thin solid #000000;
+
+}
+
+img.dllogo { 
+    padding: 20px; 
+
+}
+
+.dllogo:hover { 
+    -moz-box-shadow: 0 0 10px #ccc; 
+    -webkit-box-shadow: 0 0 10px #ccc; 
+    box-shadow: 0 0 10px #ccc; 
+} 
Index: /other-projects/meddle/trunk/index.html
===================================================================
--- /other-projects/meddle/trunk/index.html	(revision 31626)
+++ /other-projects/meddle/trunk/index.html	(revision 31627)
@@ -2,14 +2,66 @@
   <head>
     <meta charset="UTF-8">
+    <link rel="stylesheet" type="text/css" href="index.css">
     <script
        src="https://code.jquery.com/jquery-2.2.4.min.js"
        integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
        crossorigin="anonymous"></script>
-    
+<!--    
     <script src="index.js"></script>
+-->
 
   </head>
   <body id="body">
-    Loading in the MEDDLE ACM DL home page ...
+    
+
+<div id="outer">
+    <div id="header">
+
+      <h2>
+	<img src="//bedrock.resnet.cms.waikato.ac.nz/meddle/meddle-icon-large.png" height="40" width="40">
+	MEDDLE Proxy: ModifiED Digital Library Proxy
+      </h2>
+    </div>
+<!--
+    <div id="nav">
+        <h4>Navigation</h4>
+        <ul>
+            <li>Item 1</li>
+            <li>Item 2</li>
+            <li>Item 3</li>
+        </ul>
+    </div>
+-->
+    <div id="main">
+      <p>
+	Which Digital Library would you like to MEDDLE with?
+      </p>
+      <ul style="list-style: none;">
+	<li>
+	  <a href="https://bedrock.resnet.cms.waikato.ac.nz/cgi-bin/meddle/nph-proxy-meddle.cgi/en/20/http/dl.acm.org/">
+	    <img class="dllogo" src="meddle-acmdl.png">
+	  </a>
+	</li>
+	<li>
+	  <a href="https://bedrock.resnet.cms.waikato.ac.nz/cgi-bin/meddle/nph-proxy-meddle.cgi/en/20/http/ieeexplore.ieee.org/">
+	    <img class="dllogo" src="meddle-xplore.png">
+	  </a>
+	</li>
+	<li>
+	  <a href="https://bedrock.resnet.cms.waikato.ac.nz/cgi-bin/meddle/nph-proxy-meddle.cgi/en/20/https/scholar.google.com/">
+	    <img class="dllogo" src="meddle-gscholar.png">
+	  </a>
+	</li>
+      </ul>
+    </div>
+    <div id="footer">
+        <p></p>
+    </div>
+
+</div>
+
+
+
+
   </body>
 </html>
Index: /other-projects/meddle/trunk/meddle-fixup.js
===================================================================
--- /other-projects/meddle/trunk/meddle-fixup.js	(revision 31626)
+++ /other-projects/meddle/trunk/meddle-fixup.js	(revision 31627)
@@ -1,4 +1,8 @@
-// https://en.wikipedia.org/wiki/List_of_precomposed_Latin_characters_in_Unicode
-// https://en.wikipedia.org/wiki/Typographic_ligature#Ligatures_in_Unicode_.28Latin_alphabets.29
+// MEDDLE version 0.9
+
+
+// Ligature lookup info:
+//   https://en.wikipedia.org/wiki/List_of_precomposed_Latin_characters_in_Unicode
+//   https://en.wikipedia.org/wiki/Typographic_ligature#Ligatures_in_Unicode_.28Latin_alphabets.29
 
 function trim(str)
@@ -203,10 +207,9 @@
 function meddleInfoBox() {
 
-    $('#_proxy_css_top_insertion').append('<form name="MeddleForm" style="padding-bottom: 20px;"><center><table cellpadding="5" border="1"><tbody><tr><td align="center"><img src="http://bedrock.resnet.cms.waikato.ac.nz/meddle/meddle-icon-large.png" width="64" height="64" /></td><td><b><font size="+1">MEDDLE Proxy: ModifiED Digital Library Proxy</font></b><br /><div id="dlcontext"></div><div id="dlcontextoptions"</div></td></tr></tbody></table></center></form>');
+    $('#_proxy_css_top_insertion').append('<form name="MeddleForm" style="padding-bottom: 20px;"><center><table cellpadding="5" border="1"><tbody><tr><td align="center"><img src="http://bedrock.resnet.cms.waikato.ac.nz/meddle/meddle-icon-large.png" width="64" height="64" /></td><td><b><font size="+1"><a href="https://bedrock.resnet.cms.waikato.ac.nz/meddle/">MEDDLE Proxy: ModifiED Digital Library Proxy</a></font></b><br /><div id="dlcontext"></div><div id="dlcontextoptions"</div></td></tr></tbody></table></center></form>');
 
     // Icon image
     // By VistaICO.com (VistaICO Toolbar Icons) [CC BY 3.0 ]
 
-    // if (window.location.matches(/^h
 
     var dlcontextoptions = '<input id="meddle-lig" name="meddle-lig" type="checkbox"><label for="meddle-lig" style="display: inline">&nbsp;Ligature&nbsp;expansion</label>&nbsp;&nbsp;<input id="meddle-acc" name="meddle-acc" type="checkbox"><label for="meddle-acc" style="display: inline">&nbsp;Accent&nbsp;folding</label>';
@@ -243,15 +246,7 @@
 
 
-
-//var acmdl_fixup_div = document.getElementById("acmdl-fixup");
-
-
-//window.onload = function(e) {
-
 function acmdlFixupInit() {
 
     console.log("amc-dl-fixup initiated");
-
-    meddleInfoBox();
 
     var query_form = document.getElementsByName("qiksearch")[0];
@@ -260,14 +255,5 @@
     }
 
-    //query_form.setAttribute("onsubmit", "encodeInput(this) ; _proxy_jslib_flush_write_buffers();");
-
 /*
-    var query_box_val = query_form.elements['query'].value;
-
-    //var ft_regex = /content.ftsec:\(\+(.*?)\)/g;
-    //var match = ft_regex.exec(query_box_val);
-
-    query_form.value = query_box_val.replace(/content.ftsec:\(\+(.*)\)/g,"$1");
-
     //var query_box = document.getElementsByName("query")[0];
     //var query_box_val = query_box.getAttribute("value");
@@ -292,7 +278,104 @@
 
 
+function fixupGScholarSubmit(evt) {
+    //alert("Bar");
+    console.log( "gscholar-dl-fixup fixupEncodeInput(form) called" );
+
+    var event = evt || window.event;
+    form = event.target.id;
+
+    event.preventDefault(); // to stop the form from submitting
+
+    if (ligature_re === null) {
+        var ligature_str = Object.keys(ligature_map).join("|");
+        ligature_re = new RegExp(ligature_str);
+    }
+
+    //console.log("*** ligature_str = " + ligature_str);
+
+    //var query_box_val = form.elements['q'].value;
+    var query_box = document.getElementById("gs_hp_tsi");
+    var query_box_val = query_box.value;
+
+    var detected_ligatures = ligature_re.test(query_box_val);
+    if (detected_ligatures) {
+	//var do_replacement = confirm("Detected ligatures in query. Replace with individual characters?");
+	var do_replacement = $('#meddle-lig').is(":checked");
+
+	if (do_replacement) {
+            var query_chars = query_box_val.split("");
+            var query_chars_fixed = [];
+	    
+            for (var i=0; i<query_chars.length; i++) {
+		var c = query_chars[i];
+		if (ligature_map[c]) {
+		    c = ligature_map[c];
+		}
+		query_chars_fixed.push(c);
+            }
+            query_box_val = query_chars_fixed.join("");
+	}
+    }
+
+    var do_accent_replacement = $('#meddle-acc').is(":checked");
+    if (do_accent_replacement) {
+	query_box_val = accent_fold(query_box_val);
+    }
+
+
+    //form.elements['q'].value = query_box_val;
+    query_box.value = query_box_val;
+
+    _proxy_jslib_flush_write_buffers();
+
+    var query_form = document.getElementsByName("f")[0];
+    query_form.submit();
+    //form.submit(); 
+}
+
+function gscholarFixupInit() {
+
+    console.log("gscholar-fixup initiated");
+
+    var query_form = document.getElementsByName("f")[0];
+    if (query_form) {
+	//query_form.setAttribute("onsubmit", "fixupGScholarSubmit(this) ; _proxy_jslib_flush_write_buffers();");
+	//query_form.setAttribute("onsubmit", fixupGScholarSubmit);
+	//query_form.setAttribute("onsubmit", 'function(evt) { fixupGoogleSubmit(evt,this) }');
+
+	query_form.onsubmit = fixupGScholarSubmit;
+/*
+function(evt)  {
+            var event = evt || window.event;
+	    fixupGScholarSubmit(event,event.target.id);
+
+            //console.log(event.target.id); // myform
+	    
+	}
+*/
+
+    }
+
+
+
+/*
+    //var query_box = document.getElementsByName("query")[0];
+    //var query_box_val = query_box.getAttribute("value");
+    //query_box.setAttribute("value", "Foo");
+*/
+    console.log("gscholar DOM tweaks done");
+}
+
+
+// Google Scholar
+// <input class="gs_in_txt" name="q" value="" data-iq="" id="gs_hp_tsi" size="57" maxlength="256" autocapitalize="off" autocomplete="off" aria-label="Search" dir="ltr" type="text">
+
 $(document).ready(function() {
   console.log( "jquery DOM ready" );
+  meddleInfoBox();
+
   acmdlFixupInit()
+  gscholarFixupInit()
+
 });
 
