1    // make the size="" attribute empty when
2    // ---> editing pages
3    // jQuery(document).ready(function() { // <html> tag has loaded
4
5    //jQuery(window).load(function() { // deprecated since jquery 1.8
6                                         // .load event handling suite removed in jquery 3
7    jQuery(window).on('load', function() { // web page has finished loading
8
9    function isMobile() {
10    var index = navigator.appVersion.indexOf("Mobile"); // detect chrome for android and ios safari
11    var index2 = navigator.appVersion.indexOf("Android"); // detect firefox for android
12    if (index2) { return (index2 > -1); }
13    return (index > -1);
14    }
15
16    usingmobile = isMobile();
17    if (usingmobile){
18        jQuery('input').filter(function(){
19        return !jQuery(this).attr('size');
20        }).attr('size',''); // change to a number if desired
21        jQuery('textarea').filter(function(){
22        return !jQuery(this).attr('size');
23        }).attr('cols',''); // change to a number if desired
24
25        jQuery("#edit__summary").attr('size', '');
26    }
27
28});