1 | // MEDDLE version 0.9
|
---|
2 |
|
---|
3 |
|
---|
4 | // Ligature lookup info:
|
---|
5 | // https://en.wikipedia.org/wiki/List_of_precomposed_Latin_characters_in_Unicode
|
---|
6 | // https://en.wikipedia.org/wiki/Typographic_ligature#Ligatures_in_Unicode_.28Latin_alphabets.29
|
---|
7 |
|
---|
8 | function trim(str)
|
---|
9 | {
|
---|
10 | return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
|
---|
11 | }
|
---|
12 |
|
---|
13 | var ligature_map = {
|
---|
14 |
|
---|
15 | "\uA732": "AA" ,
|
---|
16 | "\uA733": "aa" ,
|
---|
17 | "\u00C6": "AE" ,
|
---|
18 | "\u00E6": "ae" ,
|
---|
19 | "\uA734": "AO" ,
|
---|
20 | "\uA735": "ao" ,
|
---|
21 | "\uA736": "AU" ,
|
---|
22 | "\uA737": "au" ,
|
---|
23 | "\uA738": "AV" ,
|
---|
24 | "\uA739": "av" ,
|
---|
25 | // as above but with bar
|
---|
26 | "\uA73A": "AV" ,
|
---|
27 | "\uA73B": "av" ,
|
---|
28 | "\uA73C": "AY" ,
|
---|
29 | "\uA73D": "ay" ,
|
---|
30 | "\u1F670": "et" ,
|
---|
31 | "\uFB00": "ff" ,
|
---|
32 | "\uFB03": "ffi" ,
|
---|
33 | "\uFB04": "ffl" ,
|
---|
34 | "\uFB01": "fi" ,
|
---|
35 | "\uFB02": "fl" ,
|
---|
36 | "\u0152": "OE" ,
|
---|
37 | "\u0153": "oe" ,
|
---|
38 | "\uA74E": "OO" ,
|
---|
39 | "\uA74F": "oo" ,
|
---|
40 | "\u00DF": "Å¿s" ,
|
---|
41 | "\u00DF": "Å¿z" ,
|
---|
42 | "\uFB06": "st" ,
|
---|
43 | "\uFB05": "Å¿t" ,
|
---|
44 | "\uA728": "TZ" ,
|
---|
45 | "\uA729": "tz" ,
|
---|
46 | "\u1D6B": "ue" ,
|
---|
47 | "\uAB50": "ui" ,
|
---|
48 | "\uA760": "VY" ,
|
---|
49 | "\uA761": "vy"
|
---|
50 | };
|
---|
51 |
|
---|
52 | var ligature_re = null;
|
---|
53 |
|
---|
54 | var accented = {
|
---|
55 | 'a': '[Aa\xaa\xc0-\xc5\xe0-\xe5\u0100-\u0105\u01cd\u01ce\u0200-\u0203\u0226\u0227\u1d2c\u1d43\u1e00\u1e01\u1e9a\u1ea0-\u1ea3\u2090\u2100\u2101\u213b\u249c\u24b6\u24d0\u3371-\u3374\u3380-\u3384\u3388\u3389\u33a9-\u33af\u33c2\u33ca\u33df\u33ff\uff21\uff41]',
|
---|
56 | 'b': '[Bb\u1d2e\u1d47\u1e02-\u1e07\u212c\u249d\u24b7\u24d1\u3374\u3385-\u3387\u33c3\u33c8\u33d4\u33dd\uff22\uff42]',
|
---|
57 | 'c': '[Cc\xc7\xe7\u0106-\u010d\u1d9c\u2100\u2102\u2103\u2105\u2106\u212d\u216d\u217d\u249e\u24b8\u24d2\u3376\u3388\u3389\u339d\u33a0\u33a4\u33c4-\u33c7\uff23\uff43]',
|
---|
58 | 'd': '[Dd\u010e\u010f\u01c4-\u01c6\u01f1-\u01f3\u1d30\u1d48\u1e0a-\u1e13\u2145\u2146\u216e\u217e\u249f\u24b9\u24d3\u32cf\u3372\u3377-\u3379\u3397\u33ad-\u33af\u33c5\u33c8\uff24\uff44]',
|
---|
59 | 'e': '[Ee\xc8-\xcb\xe8-\xeb\u0112-\u011b\u0204-\u0207\u0228\u0229\u1d31\u1d49\u1e18-\u1e1b\u1eb8-\u1ebd\u2091\u2121\u212f\u2130\u2147\u24a0\u24ba\u24d4\u3250\u32cd\u32ce\uff25\uff45]',
|
---|
60 | 'f': '[Ff\u1da0\u1e1e\u1e1f\u2109\u2131\u213b\u24a1\u24bb\u24d5\u338a-\u338c\u3399\ufb00-\ufb04\uff26\uff46]',
|
---|
61 | 'g': '[Gg\u011c-\u0123\u01e6\u01e7\u01f4\u01f5\u1d33\u1d4d\u1e20\u1e21\u210a\u24a2\u24bc\u24d6\u32cc\u32cd\u3387\u338d-\u338f\u3393\u33ac\u33c6\u33c9\u33d2\u33ff\uff27\uff47]',
|
---|
62 | 'h': '[Hh\u0124\u0125\u021e\u021f\u02b0\u1d34\u1e22-\u1e2b\u1e96\u210b-\u210e\u24a3\u24bd\u24d7\u32cc\u3371\u3390-\u3394\u33ca\u33cb\u33d7\uff28\uff48]',
|
---|
63 | 'i': '[Ii\xcc-\xcf\xec-\xef\u0128-\u0130\u0132\u0133\u01cf\u01d0\u0208-\u020b\u1d35\u1d62\u1e2c\u1e2d\u1ec8-\u1ecb\u2071\u2110\u2111\u2139\u2148\u2160-\u2163\u2165-\u2168\u216a\u216b\u2170-\u2173\u2175-\u2178\u217a\u217b\u24a4\u24be\u24d8\u337a\u33cc\u33d5\ufb01\ufb03\uff29\uff49]',
|
---|
64 | 'j': '[Jj\u0132-\u0135\u01c7-\u01cc\u01f0\u02b2\u1d36\u2149\u24a5\u24bf\u24d9\u2c7c\uff2a\uff4a]',
|
---|
65 | 'k': '[Kk\u0136\u0137\u01e8\u01e9\u1d37\u1d4f\u1e30-\u1e35\u212a\u24a6\u24c0\u24da\u3384\u3385\u3389\u338f\u3391\u3398\u339e\u33a2\u33a6\u33aa\u33b8\u33be\u33c0\u33c6\u33cd-\u33cf\uff2b\uff4b]',
|
---|
66 | 'l': '[Ll\u0139-\u0140\u01c7-\u01c9\u02e1\u1d38\u1e36\u1e37\u1e3a-\u1e3d\u2112\u2113\u2121\u216c\u217c\u24a7\u24c1\u24db\u32cf\u3388\u3389\u33d0-\u33d3\u33d5\u33d6\u33ff\ufb02\ufb04\uff2c\uff4c]',
|
---|
67 | 'm': '[Mm\u1d39\u1d50\u1e3e-\u1e43\u2120\u2122\u2133\u216f\u217f\u24a8\u24c2\u24dc\u3377-\u3379\u3383\u3386\u338e\u3392\u3396\u3399-\u33a8\u33ab\u33b3\u33b7\u33b9\u33bd\u33bf\u33c1\u33c2\u33ce\u33d0\u33d4-\u33d6\u33d8\u33d9\u33de\u33df\uff2d\uff4d]',
|
---|
68 | 'n': '[Nn\xd1\xf1\u0143-\u0149\u01ca-\u01cc\u01f8\u01f9\u1d3a\u1e44-\u1e4b\u207f\u2115\u2116\u24a9\u24c3\u24dd\u3381\u338b\u339a\u33b1\u33b5\u33bb\u33cc\u33d1\uff2e\uff4e]',
|
---|
69 | 'o': '[Oo\xba\xd2-\xd6\xf2-\xf6\u014c-\u0151\u01a0\u01a1\u01d1\u01d2\u01ea\u01eb\u020c-\u020f\u022e\u022f\u1d3c\u1d52\u1ecc-\u1ecf\u2092\u2105\u2116\u2134\u24aa\u24c4\u24de\u3375\u33c7\u33d2\u33d6\uff2f\uff4f]',
|
---|
70 | 'p': '[Pp\u1d3e\u1d56\u1e54-\u1e57\u2119\u24ab\u24c5\u24df\u3250\u3371\u3376\u3380\u338a\u33a9-\u33ac\u33b0\u33b4\u33ba\u33cb\u33d7-\u33da\uff30\uff50]',
|
---|
71 | 'q': '[Qq\u211a\u24ac\u24c6\u24e0\u33c3\uff31\uff51]',
|
---|
72 | 'r': '[Rr\u0154-\u0159\u0210-\u0213\u02b3\u1d3f\u1d63\u1e58-\u1e5b\u1e5e\u1e5f\u20a8\u211b-\u211d\u24ad\u24c7\u24e1\u32cd\u3374\u33ad-\u33af\u33da\u33db\uff32\uff52]',
|
---|
73 | 's': '[Ss\u015a-\u0161\u017f\u0218\u0219\u02e2\u1e60-\u1e63\u20a8\u2101\u2120\u24ae\u24c8\u24e2\u33a7\u33a8\u33ae-\u33b3\u33db\u33dc\ufb06\uff33\uff53]',
|
---|
74 | 't': '[Tt\u0162-\u0165\u021a\u021b\u1d40\u1d57\u1e6a-\u1e71\u1e97\u2121\u2122\u24af\u24c9\u24e3\u3250\u32cf\u3394\u33cf\ufb05\ufb06\uff34\uff54]',
|
---|
75 | 'u': '[Uu\xd9-\xdc\xf9-\xfc\u0168-\u0173\u01af\u01b0\u01d3\u01d4\u0214-\u0217\u1d41\u1d58\u1d64\u1e72-\u1e77\u1ee4-\u1ee7\u2106\u24b0\u24ca\u24e4\u3373\u337a\uff35\uff55]',
|
---|
76 | 'v': '[Vv\u1d5b\u1d65\u1e7c-\u1e7f\u2163-\u2167\u2173-\u2177\u24b1\u24cb\u24e5\u2c7d\u32ce\u3375\u33b4-\u33b9\u33dc\u33de\uff36\uff56]',
|
---|
77 | 'w': '[Ww\u0174\u0175\u02b7\u1d42\u1e80-\u1e89\u1e98\u24b2\u24cc\u24e6\u33ba-\u33bf\u33dd\uff37\uff57]',
|
---|
78 | 'x': '[Xx\u02e3\u1e8a-\u1e8d\u2093\u213b\u2168-\u216b\u2178-\u217b\u24b3\u24cd\u24e7\u33d3\uff38\uff58]',
|
---|
79 | 'y': '[Yy\xdd\xfd\xff\u0176-\u0178\u0232\u0233\u02b8\u1e8e\u1e8f\u1e99\u1ef2-\u1ef9\u24b4\u24ce\u24e8\u33c9\uff39\uff59]',
|
---|
80 | 'z': '[Zz\u0179-\u017e\u01f1-\u01f3\u1dbb\u1e90-\u1e95\u2124\u2128\u24b5\u24cf\u24e9\u3390-\u3394\uff3a\uff5a]'
|
---|
81 | };
|
---|
82 |
|
---|
83 | function accent_fold(search_string)
|
---|
84 | {
|
---|
85 | // tidy up any pre- or post- whitespace
|
---|
86 | search_string = trim(search_string);
|
---|
87 |
|
---|
88 | // protect any string literals that are special RE characters
|
---|
89 | search_string = search_string.replace(/([|\(\)\[\{\}.+*?^$\\])/g,"\\$1");
|
---|
90 |
|
---|
91 | // replace characters by their compositors
|
---|
92 | var accent_replacer = function(chr) {
|
---|
93 | if (chr.charCodeAt(0)>128) {
|
---|
94 | for (var base_c in accented) {
|
---|
95 | var letter_re = new RegExp(accented[base_c],'gi');
|
---|
96 | if (letter_re.test(chr)) {
|
---|
97 | // Got accented char
|
---|
98 | // => downgrade to base character
|
---|
99 | chr = base_c;
|
---|
100 | }
|
---|
101 | // otherwise, leave it alone
|
---|
102 | }
|
---|
103 | }
|
---|
104 | return chr;
|
---|
105 | }
|
---|
106 |
|
---|
107 | search_string = search_string.replace(/\S/g,accent_replacer);
|
---|
108 | search_string = search_string.replace(/\\([|\(\)\[\{\}.+*?^$\\])/g,"$1");
|
---|
109 |
|
---|
110 | search_string = search_string.replace(/\s+/g," ");
|
---|
111 |
|
---|
112 | return search_string;
|
---|
113 | }
|
---|
114 |
|
---|
115 |
|
---|
116 |
|
---|
117 | function fixupEncodeInput(form) {
|
---|
118 | console.log( "amcm-dl-fixup fixupEncodeInput(form) called" );
|
---|
119 |
|
---|
120 | if (ligature_re === null) {
|
---|
121 | var ligature_str = Object.keys(ligature_map).join("|");
|
---|
122 | ligature_re = new RegExp(ligature_str);
|
---|
123 | }
|
---|
124 |
|
---|
125 | //console.log("*** ligature_str = " + ligature_str);
|
---|
126 |
|
---|
127 | var query_box_val = form.elements['query'].value;
|
---|
128 |
|
---|
129 | var detected_ligatures = ligature_re.test(query_box_val);
|
---|
130 | if (detected_ligatures) {
|
---|
131 | //var do_replacement = confirm("Detected ligatures in query. Replace with individual characters?");
|
---|
132 | var do_replacement = $('#meddle-lig').is(":checked");
|
---|
133 |
|
---|
134 | if (do_replacement) {
|
---|
135 | var query_chars = query_box_val.split("");
|
---|
136 | var query_chars_fixed = [];
|
---|
137 |
|
---|
138 | for (var i=0; i<query_chars.length; i++) {
|
---|
139 | var c = query_chars[i];
|
---|
140 | if (ligature_map[c]) {
|
---|
141 | c = ligature_map[c];
|
---|
142 | }
|
---|
143 | query_chars_fixed.push(c);
|
---|
144 | }
|
---|
145 | query_box_val = query_chars_fixed.join("");
|
---|
146 | }
|
---|
147 | }
|
---|
148 |
|
---|
149 | var do_accent_replacement = $('#meddle-acc').is(":checked");
|
---|
150 | if (do_accent_replacement) {
|
---|
151 | query_box_val = accent_fold(query_box_val);
|
---|
152 | }
|
---|
153 |
|
---|
154 | // e.g., content.ftsec:(+capisco)
|
---|
155 |
|
---|
156 | var query_box_val = query_box_val.replace(/^\s+/,"");
|
---|
157 | var query_box_words = query_box_val.split(/\s+/);
|
---|
158 |
|
---|
159 | var query_box_val_plus = "";
|
---|
160 | var query_box_val_double = "";
|
---|
161 |
|
---|
162 | for (var i=0; i<query_box_words.length; i++) {
|
---|
163 | if (i>0) {
|
---|
164 | query_box_val_plus += " ";
|
---|
165 | }
|
---|
166 | query_box_val_plus += "+" + query_box_words[i];
|
---|
167 |
|
---|
168 | if (i>0) {
|
---|
169 | query_box_val_double += " " + query_box_words[i-1]+query_box_words[i];
|
---|
170 | }
|
---|
171 | }
|
---|
172 |
|
---|
173 |
|
---|
174 | form.elements['query'].value = "content.ftsec:(" + query_box_val_plus + query_box_val_double + ")";
|
---|
175 |
|
---|
176 | return encodeInput(form);
|
---|
177 | }
|
---|
178 |
|
---|
179 | function fixupSubmitIt() {
|
---|
180 | var search_where = $("#fld0 option:selected").text();
|
---|
181 | //console.log("**** search_where = " + search_where);
|
---|
182 | var x = 0;
|
---|
183 | var search_select = $("#fld"+x+" option:selected");
|
---|
184 | var search_where = search_select.text();
|
---|
185 |
|
---|
186 | while (search_where) {
|
---|
187 | if (search_where == "Any field") {
|
---|
188 | //var sel_val = document.getElementById("fld" + x).selectedIndex].value;
|
---|
189 |
|
---|
190 | //var thisField = document.getElementById("fld" + x).options[document.getElementById("fld" + x).selectedIndex].value;
|
---|
191 |
|
---|
192 | $("#fld"+x).val('content.ftsec:');
|
---|
193 | //$("#fld0 option[value='content.ftsec:']").prop('selected', true);
|
---|
194 | //alert("changed menu");
|
---|
195 | }
|
---|
196 | x = x + 1;
|
---|
197 | search_select = $("#fld"+x+" option:selected");
|
---|
198 | search_where = search_select.text();
|
---|
199 | //console.log("*** search select = " + search_select.text());
|
---|
200 | //alert("ddd");
|
---|
201 | }
|
---|
202 | buildQuery();
|
---|
203 |
|
---|
204 | return submitIt();
|
---|
205 | }
|
---|
206 |
|
---|
207 | function meddleInfoBox() {
|
---|
208 |
|
---|
209 | $('#_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>');
|
---|
210 |
|
---|
211 | // Icon image
|
---|
212 | // By VistaICO.com (VistaICO Toolbar Icons) [CC BY 3.0 ]
|
---|
213 |
|
---|
214 |
|
---|
215 | var dlcontextoptions = '<input id="meddle-lig" name="meddle-lig" type="checkbox"><label for="meddle-lig" style="display: inline"> Ligature expansion</label> <input id="meddle-acc" name="meddle-acc" type="checkbox"><label for="meddle-acc" style="display: inline"> Accent folding</label>';
|
---|
216 |
|
---|
217 |
|
---|
218 | //console.log("*** location = " + window.location.pathname);
|
---|
219 | var detected_dl = "";
|
---|
220 |
|
---|
221 | var domain_match = window.location.pathname.match(/nph-proxy-meddle.cgi\/.*?https?\/(.*)$/);
|
---|
222 |
|
---|
223 | if (domain_match.length>1) {
|
---|
224 | var real_domain = domain_match[1];
|
---|
225 | //console.log("*** real domain = " + real_domain);
|
---|
226 |
|
---|
227 | if (real_domain.match(/^dl\.acm\.org\//)) {
|
---|
228 | detected_dl = "ACM DL (Meddled with to provide: full-text quicksearch, word-wrap protection)";
|
---|
229 | //dlcontextoptions += " Also ";
|
---|
230 | }
|
---|
231 | else if (real_domain.match(/^scholar\.google\.[a-z]+/)) {
|
---|
232 | detected_dl = "Google Scholar";
|
---|
233 | }
|
---|
234 | else if (real_domain.match(/^ieeexplore\.ieee\.org\//)) {
|
---|
235 | detected_dl = "IEEE Xplore";
|
---|
236 | }
|
---|
237 | }
|
---|
238 |
|
---|
239 | if (detected_dl !== "") {
|
---|
240 | $('#dlcontext').html("<i>Detected:" + detected_dl + "</i>");
|
---|
241 | }
|
---|
242 |
|
---|
243 | $('#dlcontextoptions').html('<font size="-1">'+dlcontextoptions+'</font>');
|
---|
244 |
|
---|
245 | }
|
---|
246 |
|
---|
247 |
|
---|
248 | function acmdlFixupInit() {
|
---|
249 |
|
---|
250 | console.log("amc-dl-fixup initiated");
|
---|
251 |
|
---|
252 | var query_form = document.getElementsByName("qiksearch")[0];
|
---|
253 | if (query_form) {
|
---|
254 | query_form.setAttribute("onsubmit", "fixupEncodeInput(this) ; _proxy_jslib_flush_write_buffers();");
|
---|
255 | }
|
---|
256 |
|
---|
257 | /*
|
---|
258 | //var query_box = document.getElementsByName("query")[0];
|
---|
259 | //var query_box_val = query_box.getAttribute("value");
|
---|
260 | //query_box.setAttribute("value", "Foo");
|
---|
261 | */
|
---|
262 | var adv_query_form = document.getElementById("theform");
|
---|
263 | if (adv_query_form) {
|
---|
264 | // javascript:submitIt();
|
---|
265 | // javascript:; _proxy_jslib_proxify_html(submitIt())[0]
|
---|
266 |
|
---|
267 | adv_query_form.setAttribute("action","javascript:fixupSubmitIt();");
|
---|
268 | }
|
---|
269 |
|
---|
270 | var query_box = document.getElementsByName("query")[0];
|
---|
271 | if (query_box) {
|
---|
272 | var query_box_val = query_box.getAttribute("value");
|
---|
273 | query_box.setAttribute("value", query_box_val.replace(/content\.ftsec:\(\+(.*)\)/g,"$1"));
|
---|
274 | }
|
---|
275 |
|
---|
276 | console.log("acm-dl-fixup DOM tweaks done");
|
---|
277 | }
|
---|
278 |
|
---|
279 |
|
---|
280 | function fixupGScholarSubmit(evt) {
|
---|
281 | //alert("Bar");
|
---|
282 | console.log( "gscholar-dl-fixup fixupEncodeInput(form) called" );
|
---|
283 |
|
---|
284 | var event = evt || window.event;
|
---|
285 | form = event.target.id;
|
---|
286 |
|
---|
287 | event.preventDefault(); // to stop the form from submitting
|
---|
288 |
|
---|
289 | if (ligature_re === null) {
|
---|
290 | var ligature_str = Object.keys(ligature_map).join("|");
|
---|
291 | ligature_re = new RegExp(ligature_str);
|
---|
292 | }
|
---|
293 |
|
---|
294 | //console.log("*** ligature_str = " + ligature_str);
|
---|
295 |
|
---|
296 | //var query_box_val = form.elements['q'].value;
|
---|
297 | var query_box = document.getElementById("gs_hp_tsi");
|
---|
298 | var query_box_val = query_box.value;
|
---|
299 |
|
---|
300 | var detected_ligatures = ligature_re.test(query_box_val);
|
---|
301 | if (detected_ligatures) {
|
---|
302 | //var do_replacement = confirm("Detected ligatures in query. Replace with individual characters?");
|
---|
303 | var do_replacement = $('#meddle-lig').is(":checked");
|
---|
304 |
|
---|
305 | if (do_replacement) {
|
---|
306 | var query_chars = query_box_val.split("");
|
---|
307 | var query_chars_fixed = [];
|
---|
308 |
|
---|
309 | for (var i=0; i<query_chars.length; i++) {
|
---|
310 | var c = query_chars[i];
|
---|
311 | if (ligature_map[c]) {
|
---|
312 | c = ligature_map[c];
|
---|
313 | }
|
---|
314 | query_chars_fixed.push(c);
|
---|
315 | }
|
---|
316 | query_box_val = query_chars_fixed.join("");
|
---|
317 | }
|
---|
318 | }
|
---|
319 |
|
---|
320 | var do_accent_replacement = $('#meddle-acc').is(":checked");
|
---|
321 | if (do_accent_replacement) {
|
---|
322 | query_box_val = accent_fold(query_box_val);
|
---|
323 | }
|
---|
324 |
|
---|
325 |
|
---|
326 | //form.elements['q'].value = query_box_val;
|
---|
327 | query_box.value = query_box_val;
|
---|
328 |
|
---|
329 | _proxy_jslib_flush_write_buffers();
|
---|
330 |
|
---|
331 | var query_form = document.getElementsByName("f")[0];
|
---|
332 | query_form.submit();
|
---|
333 | //form.submit();
|
---|
334 | }
|
---|
335 |
|
---|
336 | function gscholarFixupInit() {
|
---|
337 |
|
---|
338 | console.log("gscholar-fixup initiated");
|
---|
339 |
|
---|
340 | var query_form = document.getElementsByName("f")[0];
|
---|
341 | if (query_form) {
|
---|
342 | //query_form.setAttribute("onsubmit", "fixupGScholarSubmit(this) ; _proxy_jslib_flush_write_buffers();");
|
---|
343 | //query_form.setAttribute("onsubmit", fixupGScholarSubmit);
|
---|
344 | //query_form.setAttribute("onsubmit", 'function(evt) { fixupGoogleSubmit(evt,this) }');
|
---|
345 |
|
---|
346 | query_form.onsubmit = fixupGScholarSubmit;
|
---|
347 | /*
|
---|
348 | function(evt) {
|
---|
349 | var event = evt || window.event;
|
---|
350 | fixupGScholarSubmit(event,event.target.id);
|
---|
351 |
|
---|
352 | //console.log(event.target.id); // myform
|
---|
353 |
|
---|
354 | }
|
---|
355 | */
|
---|
356 |
|
---|
357 | }
|
---|
358 |
|
---|
359 |
|
---|
360 |
|
---|
361 | /*
|
---|
362 | //var query_box = document.getElementsByName("query")[0];
|
---|
363 | //var query_box_val = query_box.getAttribute("value");
|
---|
364 | //query_box.setAttribute("value", "Foo");
|
---|
365 | */
|
---|
366 | console.log("gscholar DOM tweaks done");
|
---|
367 | }
|
---|
368 |
|
---|
369 |
|
---|
370 | // Google Scholar
|
---|
371 | // <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">
|
---|
372 |
|
---|
373 | $(document).ready(function() {
|
---|
374 | console.log( "jquery DOM ready" );
|
---|
375 | meddleInfoBox();
|
---|
376 |
|
---|
377 | acmdlFixupInit()
|
---|
378 | gscholarFixupInit()
|
---|
379 |
|
---|
380 | });
|
---|
381 |
|
---|